From patchwork Fri Jan 13 12:31:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 43222 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp242556wrt; Fri, 13 Jan 2023 04:33:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXul7tzdlvdlyQONe4no6W4w1CJIUTVP+ru3Xfe9YuJZntsQKyVXz3YP0G7U0+ykyxztH61n X-Received: by 2002:a17:907:c98a:b0:85f:5d72:183f with SMTP id uj10-20020a170907c98a00b0085f5d72183fmr7469691ejc.56.1673613232326; Fri, 13 Jan 2023 04:33:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673613232; cv=none; d=google.com; s=arc-20160816; b=ljEcd7DyXM3AKRdDBxGwQIUOSZv0PKUuk+qXskYUA4fj7YZTTC+voell3nATU22RPS XFO8XWwB2o9EL694CLugNOwgackA6vkHK8eiazMUSdbZNWI29foawGkOraR2Zq9PGLJo TwD6tG+MSE917Y9+aIxf1pNLR1084v5u4iCqa8uuLS8wRxouXkNI7LhKZp0cC2XymT4+ ZcJO2MFUNbMudlvybrfCErVcIgUi6wDs/ftnfF/fz73YTNISqfpr4A5eBfQFYcgDa65l k2ofC0uRdx0n56wC7KLjJXl2sv+0yBa4UAyHCpWSwxM0DX4Q2m3MzCVZAJClW62N/wcK He3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=YrVSD9mvSByVVVJgGZwGXLjs6fL/wAq3WD+FK1aXvxc=; b=zIIX3eBFCj3Z2FiMimtTw7fi6i3kK7GmwF5br2krswZ52V3w6uvEbnh8xFPao5k26b YADQ+YfJKKxKX+UDOOjc85rQ7gSvIY3dZvQudNHqr6yhdHzvDYv6edfLKJvh15DPw418 Ke6Z+QUNUuwpYwviXPoBtiW4BhntCbZHeo1057OCRqxQ06RXDlwKH67MB0pyH0vGZwKX dWjW+fFjVwCo68aw7iD7CVd+c2qyCSouPWejNTHRTJSKWQVwzaQjoM7v4KnRWskN/03Z wpUkLx99TET3GQQwdMESt9exTII8/XJyjrwVwKrw5xic87j29v24lC5D7i3aKDK8WxGv D6Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=m2mYYYxM; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=q9RjxWBK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wu2-20020a170906eec200b007a92b00c094si19123420ejb.421.2023.01.13.04.33.26; Fri, 13 Jan 2023 04:33:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=m2mYYYxM; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=q9RjxWBK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241462AbjAMMcu (ORCPT + 99 others); Fri, 13 Jan 2023 07:32:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240979AbjAMMcH (ORCPT ); Fri, 13 Jan 2023 07:32:07 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 144DE43D8E; Fri, 13 Jan 2023 04:31:07 -0800 (PST) Date: Fri, 13 Jan 2023 12:31:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1673613065; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YrVSD9mvSByVVVJgGZwGXLjs6fL/wAq3WD+FK1aXvxc=; b=m2mYYYxM06RIm00g1vKQ/BmmmWa7Qlmk4gqimC/tlLnsLZ1+lVxPlDSKbUhFftmMDYb8yL lzBfUNAtF73r1tpsI/PxnZX2ByqOB42EUstNtSPkWnVrYz4guu4c+nkjJEHov5cQw9zqIn OqYmkHkXeGoLBGW87GAcjJXDxGrqXH+w66tJtcINotCSvkA/Gj1Fx7U6bGUG51zCEVhHRU s/mzX6yBX/RA/hFFM0/SVUFWKc+EXNR9kJ9QRZfpieukqWGfJWgBvTHtD/tSU7ApZkTs4t 839OIR7few+V9t2eH1KLtS9oOYdI/VfmnI5deZroQ3wRf/6ZUVtYzW+rjK24xg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1673613065; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YrVSD9mvSByVVVJgGZwGXLjs6fL/wAq3WD+FK1aXvxc=; b=q9RjxWBKb4LzTtOCy/6Xl1x0tAdzRuFjwdfrIe10rpJh1TUnubJetJcpSbL5LU6SxucDNc /XemTrooK90VtDDQ== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] cpuidle,arch: Mark all regular cpuidle_state:: Enter methods __cpuidle Cc: "Peter Zijlstra (Intel)" , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230112195542.335211484@infradead.org> References: <20230112195542.335211484@infradead.org> MIME-Version: 1.0 Message-ID: <167361306530.4906.577388410385763862.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754910668804002437?= X-GMAIL-MSGID: =?utf-8?q?1754910668804002437?= The following commit has been merged into the sched/core branch of tip: Commit-ID: 26388a7c353f7b1d3fd8a6df6452fa9773193155 Gitweb: https://git.kernel.org/tip/26388a7c353f7b1d3fd8a6df6452fa9773193155 Author: Peter Zijlstra AuthorDate: Thu, 12 Jan 2023 20:44:03 +01:00 Committer: Ingo Molnar CommitterDate: Fri, 13 Jan 2023 11:48:18 +01:00 cpuidle,arch: Mark all regular cpuidle_state:: Enter methods __cpuidle For all cpuidle drivers that do not use CPUIDLE_FLAG_RCU_IDLE (iow, the simple ones) make sure all the functions are marked __cpuidle. ( due to lack of noinstr validation on these platforms it is entirely possible this isn't complete ) Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230112195542.335211484@infradead.org --- arch/arm/kernel/cpuidle.c | 4 ++-- arch/arm/mach-davinci/cpuidle.c | 4 ++-- arch/arm/mach-imx/cpuidle-imx5.c | 4 ++-- arch/arm/mach-imx/cpuidle-imx6sl.c | 4 ++-- arch/arm/mach-imx/cpuidle-imx7ulp.c | 4 ++-- arch/arm/mach-s3c/cpuidle-s3c64xx.c | 5 ++--- arch/mips/kernel/idle.c | 6 +++--- 7 files changed, 15 insertions(+), 16 deletions(-) diff --git a/arch/arm/kernel/cpuidle.c b/arch/arm/kernel/cpuidle.c index e168462..437ff39 100644 --- a/arch/arm/kernel/cpuidle.c +++ b/arch/arm/kernel/cpuidle.c @@ -26,8 +26,8 @@ static struct cpuidle_ops cpuidle_ops[NR_CPUS] __ro_after_init; * * Returns the index passed as parameter */ -int arm_cpuidle_simple_enter(struct cpuidle_device *dev, - struct cpuidle_driver *drv, int index) +__cpuidle int arm_cpuidle_simple_enter(struct cpuidle_device *dev, struct + cpuidle_driver *drv, int index) { cpu_do_idle(); diff --git a/arch/arm/mach-davinci/cpuidle.c b/arch/arm/mach-davinci/cpuidle.c index dd38785..78a1575 100644 --- a/arch/arm/mach-davinci/cpuidle.c +++ b/arch/arm/mach-davinci/cpuidle.c @@ -44,8 +44,8 @@ static void davinci_save_ddr_power(int enter, bool pdown) } /* Actual code that puts the SoC in different idle states */ -static int davinci_enter_idle(struct cpuidle_device *dev, - struct cpuidle_driver *drv, int index) +static __cpuidle int davinci_enter_idle(struct cpuidle_device *dev, + struct cpuidle_driver *drv, int index) { davinci_save_ddr_power(1, ddr2_pdown); cpu_do_idle(); diff --git a/arch/arm/mach-imx/cpuidle-imx5.c b/arch/arm/mach-imx/cpuidle-imx5.c index a8457c4..5ad9f2f 100644 --- a/arch/arm/mach-imx/cpuidle-imx5.c +++ b/arch/arm/mach-imx/cpuidle-imx5.c @@ -8,8 +8,8 @@ #include #include "cpuidle.h" -static int imx5_cpuidle_enter(struct cpuidle_device *dev, - struct cpuidle_driver *drv, int index) +static __cpuidle int imx5_cpuidle_enter(struct cpuidle_device *dev, + struct cpuidle_driver *drv, int index) { arm_pm_idle(); return index; diff --git a/arch/arm/mach-imx/cpuidle-imx6sl.c b/arch/arm/mach-imx/cpuidle-imx6sl.c index b86ffbe..b49cd63 100644 --- a/arch/arm/mach-imx/cpuidle-imx6sl.c +++ b/arch/arm/mach-imx/cpuidle-imx6sl.c @@ -11,8 +11,8 @@ #include "common.h" #include "cpuidle.h" -static int imx6sl_enter_wait(struct cpuidle_device *dev, - struct cpuidle_driver *drv, int index) +static __cpuidle int imx6sl_enter_wait(struct cpuidle_device *dev, + struct cpuidle_driver *drv, int index) { imx6_set_lpm(WAIT_UNCLOCKED); /* diff --git a/arch/arm/mach-imx/cpuidle-imx7ulp.c b/arch/arm/mach-imx/cpuidle-imx7ulp.c index ca86c96..f55ed74 100644 --- a/arch/arm/mach-imx/cpuidle-imx7ulp.c +++ b/arch/arm/mach-imx/cpuidle-imx7ulp.c @@ -12,8 +12,8 @@ #include "common.h" #include "cpuidle.h" -static int imx7ulp_enter_wait(struct cpuidle_device *dev, - struct cpuidle_driver *drv, int index) +static __cpuidle int imx7ulp_enter_wait(struct cpuidle_device *dev, + struct cpuidle_driver *drv, int index) { if (index == 1) imx7ulp_set_lpm(ULP_PM_WAIT); diff --git a/arch/arm/mach-s3c/cpuidle-s3c64xx.c b/arch/arm/mach-s3c/cpuidle-s3c64xx.c index b1c5f43..27a13cc 100644 --- a/arch/arm/mach-s3c/cpuidle-s3c64xx.c +++ b/arch/arm/mach-s3c/cpuidle-s3c64xx.c @@ -19,9 +19,8 @@ #include "regs-sys-s3c64xx.h" #include "regs-syscon-power-s3c64xx.h" -static int s3c64xx_enter_idle(struct cpuidle_device *dev, - struct cpuidle_driver *drv, - int index) +static __cpuidle int s3c64xx_enter_idle(struct cpuidle_device *dev, + struct cpuidle_driver *drv, int index) { unsigned long tmp; diff --git a/arch/mips/kernel/idle.c b/arch/mips/kernel/idle.c index 3e7ccdd..5abc8b7 100644 --- a/arch/mips/kernel/idle.c +++ b/arch/mips/kernel/idle.c @@ -241,7 +241,7 @@ void __init check_wait(void) } } -void arch_cpu_idle(void) +__cpuidle void arch_cpu_idle(void) { if (cpu_wait) cpu_wait(); @@ -249,8 +249,8 @@ void arch_cpu_idle(void) #ifdef CONFIG_CPU_IDLE -int mips_cpuidle_wait_enter(struct cpuidle_device *dev, - struct cpuidle_driver *drv, int index) +__cpuidle int mips_cpuidle_wait_enter(struct cpuidle_device *dev, + struct cpuidle_driver *drv, int index) { arch_cpu_idle(); return index;