From nobody Sun Apr 5 20:03:28 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19054C54EBD for ; Fri, 13 Jan 2023 12:36:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241396AbjAMMf7 (ORCPT ); Fri, 13 Jan 2023 07:35:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241215AbjAMMcS (ORCPT ); Fri, 13 Jan 2023 07:32:18 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20CFA559F9; Fri, 13 Jan 2023 04:31:15 -0800 (PST) Date: Fri, 13 Jan 2023 12:31:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1673613073; 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=hP/k/NMqAdiQz8WBcJ0kwxY2utEsP452HHTIG3MkVw4=; b=rgxJ6a3mxj4FyrboxhMfMvxXHX0zTZo3Jkm8UZpHEf95ltmxldde/jrItjxO2JCzrrkCTk rJ7buqtf/Y14sU2iXJ0c/VXR3amR45qikey2Xhx/SHMzJENiZpEo+J6TuI1J4QuIBdnbD2 v8ymCikbEFLbHq8FKXcGGoRg6xy2FX2brq78psZFWFKjd82r7Y8iMmzBsML3dH1ov1XTmj hZ4NxchbIZ3sPb14u4noPYmVlk1SU1so6JWpzLf4gPB/fJNFgc5mY3PbNNE8AYIzIJdMJy 2By7myYiy9hU6SsHfVVU9wnpl9O2g2gMvnZRa6S4+XxGWBw05vNoC+rA8dsr9w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1673613073; 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=hP/k/NMqAdiQz8WBcJ0kwxY2utEsP452HHTIG3MkVw4=; b=e49LbSOx/HqASJeklYg/kBWJBlDFhf0b2hfeg8I8EU77XOpHKK/lm3QbLVjv9oQ0l7cH9X ACIH29giojARKTBQ== 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, cpu_pm: Remove RCU fiddling from cpu_pm_{enter,exit}() Cc: "Peter Zijlstra (Intel)" , Ingo Molnar , Tony Lindgren , Ulf Hansson , Mark Rutland , "Rafael J. Wysocki" , Frederic Weisbecker , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230112195540.190860672@infradead.org> References: <20230112195540.190860672@infradead.org> MIME-Version: 1.0 Message-ID: <167361307344.4906.3430175996894589521.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/core branch of tip: Commit-ID: 924aed1646bf2859726f7e5dd9265ba14358fbb8 Gitweb: https://git.kernel.org/tip/924aed1646bf2859726f7e5dd9265ba14= 358fbb8 Author: Peter Zijlstra AuthorDate: Thu, 12 Jan 2023 20:43:28 +01:00 Committer: Ingo Molnar CommitterDate: Fri, 13 Jan 2023 11:48:15 +01:00 cpuidle, cpu_pm: Remove RCU fiddling from cpu_pm_{enter,exit}() All callers should still have RCU enabled. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Ulf Hansson Acked-by: Mark Rutland Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195540.190860672@infradead.org --- kernel/cpu_pm.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/kernel/cpu_pm.c b/kernel/cpu_pm.c index ba4ba71..b0f0d15 100644 --- a/kernel/cpu_pm.c +++ b/kernel/cpu_pm.c @@ -30,16 +30,9 @@ static int cpu_pm_notify(enum cpu_pm_event event) { int ret; =20 - /* - * This introduces a RCU read critical section, which could be - * disfunctional in cpu idle. Copy RCU_NONIDLE code to let RCU know - * this. - */ - ct_irq_enter_irqson(); rcu_read_lock(); ret =3D raw_notifier_call_chain(&cpu_pm_notifier.chain, event, NULL); rcu_read_unlock(); - ct_irq_exit_irqson(); =20 return notifier_to_errno(ret); } @@ -49,11 +42,9 @@ static int cpu_pm_notify_robust(enum cpu_pm_event event_= up, enum cpu_pm_event ev unsigned long flags; int ret; =20 - ct_irq_enter_irqson(); raw_spin_lock_irqsave(&cpu_pm_notifier.lock, flags); ret =3D raw_notifier_call_chain_robust(&cpu_pm_notifier.chain, event_up, = event_down, NULL); raw_spin_unlock_irqrestore(&cpu_pm_notifier.lock, flags); - ct_irq_exit_irqson(); =20 return notifier_to_errno(ret); }