From patchwork Fri Jan 13 12:31:07 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: 43237 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp243336wrt; Fri, 13 Jan 2023 04:35:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXt3XeJK/7lhaG/84nG4q8pVm+D4PyRnzek37P6OaRXILxb93wMgrjHwofV+dAkjj52iOzOy X-Received: by 2002:a05:6402:2420:b0:463:a84c:6805 with SMTP id t32-20020a056402242000b00463a84c6805mr75526916eda.15.1673613339904; Fri, 13 Jan 2023 04:35:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673613339; cv=none; d=google.com; s=arc-20160816; b=QWDOWnzEwANyt9BDVUn2dNga0cq3ANo0kLHeUp4R2GkwGd5/x31adURwm9eTKyVdSK rECqKS8apjXjQMBk9UhvqJmUzwl51/z0ROP8oKDbYDvAu8YxT5FYio8ao4DYw03wUI5G iTrNMoiSE584XIRJTMwBxMKFiGETYWboSfCnm681M1ufmDAK9BqgvzhFFq/uZOrzCsMn 6xjvI8QuTNGyQwviLmlq1zKMOERmIowAqihnLQuU0lymw1c3q2AB1rIn3gnO3YZAFHGq soow8ZGtPJf/+NlIiSHyy3tefWv68/9Ybg91OCGt0g7BgRhpUBMUA7ufXbk1YGztewhL 5s0Q== 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=g0lO5s0BlGqs/dCckz+ZdrpgCPAhdNQATe6DxgG7kp0=; b=cPm5bxawuvMqV2S4HH7zaVkMA/sIdGMNyPKr+Y+nizG2KI2cQ/wYJo8gS5t5nm/iM8 P1CB2EhlQH8NKTS0yTlHaXz2Ic19t6wpKWSbm/D8B9Lkc3JIopgX4+/3dybIB0ELZN7m /iAC+kJAogtyiEXVlIVACQDXiaurLQm7P1AOZ9PrMRQ2w+WiigEawuMJvHrrHof5tvtE h7x92mo4QapQRZ7BZjmQuBy8QIomvx6olPWvRypTZyrWA0mKFfJcqfPCrY6FfFVlP5Z9 zolNt+OyKeyUrg2ehQsQo+k7Gqt6EIINkcBOxmzugZhmvmHrAWhuC8OWp2SRX9ANGXqV m7/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=mXJ57Tu9; dkim=neutral (no key) header.i=@linutronix.de; 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 y14-20020a056402270e00b0046a84b922a2si25020081edd.499.2023.01.13.04.35.16; Fri, 13 Jan 2023 04:35:39 -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=mXJ57Tu9; dkim=neutral (no key) header.i=@linutronix.de; 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 S241293AbjAMMeC (ORCPT + 99 others); Fri, 13 Jan 2023 07:34:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240464AbjAMMcM (ORCPT ); Fri, 13 Jan 2023 07:32:12 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2BBE5373C; Fri, 13 Jan 2023 04:31:10 -0800 (PST) Date: Fri, 13 Jan 2023 12:31:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1673613068; 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=g0lO5s0BlGqs/dCckz+ZdrpgCPAhdNQATe6DxgG7kp0=; b=mXJ57Tu9tpih38G8bYh9cn8IcCS/81kDxX0KppnvQRlrfTLLXlXf4+k7YqdnlApn10l8Kq ABfkjPe6GUA7piij3s7ZRgNhHmzKxZVfLENbVaCn/RebusoX4YBrGy2Zvom351ZifN9Rsn w6OlFR3SxOEyPgwAL1nRwNT7VkF5eeIdnsfK6Qpgas416fzhQKSHmsUf1Vijduzv7uSiUO zMGVOQ5N0JMpJtImfTHRq2Qp/MxhwgCwxELPgF2D3o44kzt9J1vS1UApWwc1/5g3ymFIPe wiiQbCu8BXHe65FrZngyQ0TIfKtMAKt62yW0u2buhTn0w87UmPW0+VuoTOLEsg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1673613068; 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=g0lO5s0BlGqs/dCckz+ZdrpgCPAhdNQATe6DxgG7kp0=; b=sDs79vXf/kFTtFU7u3ZmHDqVsAqri10GwOBfKd8W5l+coGJkMB3CmwUcPkugbWAMWKJ3uD 2SRTjftfXRiSAsDg== 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, OMAP3: Push RCU-idle into omap_sram_idle() Cc: "Peter Zijlstra (Intel)" , Ingo Molnar , Tony Lindgren , Ulf Hansson , "Rafael J. Wysocki" , Frederic Weisbecker , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230112195541.599561742@infradead.org> References: <20230112195541.599561742@infradead.org> MIME-Version: 1.0 Message-ID: <167361306760.4906.9133049852449204892.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?1754910781522333658?= X-GMAIL-MSGID: =?utf-8?q?1754910781522333658?= The following commit has been merged into the sched/core branch of tip: Commit-ID: 8c0956aa76f97003e2ac96e86b00a2a4e82abf8e Gitweb: https://git.kernel.org/tip/8c0956aa76f97003e2ac96e86b00a2a4e82abf8e Author: Peter Zijlstra AuthorDate: Thu, 12 Jan 2023 20:43:51 +01:00 Committer: Ingo Molnar CommitterDate: Fri, 13 Jan 2023 11:48:16 +01:00 cpuidle, OMAP3: Push RCU-idle into omap_sram_idle() OMAP3 uses full SoC suspend modes as idle states, as such it needs the whole power-domain and clock-domain code from the idle path. All that code is not suitable to run with RCU disabled, as such push RCU-idle deeper still. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Tony Lindgren Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195541.599561742@infradead.org --- arch/arm/mach-omap2/cpuidle34xx.c | 4 +--- arch/arm/mach-omap2/pm.h | 2 +- arch/arm/mach-omap2/pm34xx.c | 12 ++++++++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 6d63769..2ab5dcb 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -133,9 +133,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev, } /* Execute ARM wfi */ - ct_cpuidle_enter(); - omap_sram_idle(); - ct_cpuidle_exit(); + omap_sram_idle(true); /* * Call idle CPU PM enter notifier chain to restore diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 80e84ae..4a6c9d1 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h @@ -29,7 +29,7 @@ static inline int omap4_idle_init(void) extern void *omap3_secure_ram_storage; extern void omap3_pm_off_mode_enable(int); -extern void omap_sram_idle(void); +extern void omap_sram_idle(bool rcuidle); extern int omap_pm_clkdms_setup(struct clockdomain *clkdm, void *unused); #if defined(CONFIG_PM_OPP) diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 9a3535b..9856091 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -26,6 +26,7 @@ #include #include #include +#include #include @@ -174,7 +175,7 @@ static int omap34xx_do_sram_idle(unsigned long save_state) return 0; } -void omap_sram_idle(void) +void omap_sram_idle(bool rcuidle) { /* Variable to tell what needs to be saved and restored * in omap_sram_idle*/ @@ -254,11 +255,18 @@ void omap_sram_idle(void) */ if (save_state) omap34xx_save_context(omap3_arm_context); + + if (rcuidle) + ct_cpuidle_enter(); + if (save_state == 1 || save_state == 3) cpu_suspend(save_state, omap34xx_do_sram_idle); else omap34xx_do_sram_idle(save_state); + if (rcuidle) + ct_cpuidle_exit(); + /* Restore normal SDRC POWER settings */ if (cpu_is_omap3430() && omap_rev() >= OMAP3430_REV_ES3_0 && (omap_type() == OMAP2_DEVICE_TYPE_EMU || @@ -316,7 +324,7 @@ static int omap3_pm_suspend(void) omap3_intc_suspend(); - omap_sram_idle(); + omap_sram_idle(false); restore: /* Restore next_pwrsts */