From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Rostedt Subject: [PATCH RT 05/15] PM / CPU: replace raw_notifier with atomic_notifier (fixup) Date: Fri, 01 Dec 2017 19:01:54 -0500 Message-ID: <20171202000427.438847949@goodmis.org> References: <20171202000149.842718953@goodmis.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Cc: Thomas Gleixner , Carsten Emde , Sebastian Andrzej Siewior , John Kacur , Paul Gortmaker , Julia Cartwright , Daniel Wagner , tom.zanussi@linux.intel.com, Alex Shi To: linux-kernel@vger.kernel.org, linux-rt-users Return-path: Received: from mail.kernel.org ([198.145.29.99]:44246 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752070AbdLBAE3 (ORCPT ); Fri, 1 Dec 2017 19:04:29 -0500 Content-Disposition: inline; filename=0005-PM-CPU-replace-raw_notifier-with-atomic_notifier-fix.patch Sender: linux-rt-users-owner@vger.kernel.org List-ID: 4.9.65-rt57-rc2 stable review patch. If anyone has any objections, please let me know. ------------------ From: Sebastian Andrzej Siewior The original patch changed betwen its posting and what finally went into Rafael's tree so here is the delta. Signed-off-by: Sebastian Andrzej Siewior --- kernel/cpu_pm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kernel/cpu_pm.c b/kernel/cpu_pm.c index 10f4640f991e..67b02e138a47 100644 --- a/kernel/cpu_pm.c +++ b/kernel/cpu_pm.c @@ -28,8 +28,15 @@ static int cpu_pm_notify(enum cpu_pm_event event, int nr_to_call, int *nr_calls) { int ret; + /* + * __atomic_notifier_call_chain has a RCU read critical section, which + * could be disfunctional in cpu idle. Copy RCU_NONIDLE code to let + * RCU know this. + */ + rcu_irq_enter_irqson(); ret = __atomic_notifier_call_chain(&cpu_pm_notifier_chain, event, NULL, nr_to_call, nr_calls); + rcu_irq_exit_irqson(); return notifier_to_errno(ret); } -- 2.13.2