From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: [PATCH][Fix] cpuidle: Run tick_broadcast_exit() with disabled interrupts Date: Fri, 01 May 2015 00:10:35 +0200 Message-ID: <1934706.ixTLMcGVHV@vostro.rjw.lan> References: <2112147.0kYCHhbEJT@vostro.rjw.lan> <2872649.RClMYKns0i@vostro.rjw.lan> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7Bit Return-path: Received: from v094114.home.net.pl ([79.96.170.134]:60016 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750791AbbD3Vpk (ORCPT ); Thu, 30 Apr 2015 17:45:40 -0400 In-Reply-To: Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Nicolas Pitre Cc: Sudeep Holla , Peter Zijlstra , Linus Walleij , Daniel Lezcano , "Rafael J. Wysocki" , Linux PM list , Thomas Gleixner , Ingo Molnar , Linux Kernel Mailing List , ACPI Devel Maling List On Thursday, April 30, 2015 04:12:46 PM Nicolas Pitre wrote: > On Wed, 29 Apr 2015, Rafael J. Wysocki wrote: > > > From: Rafael J. Wysocki > > > > Commit 335f49196fd6 (sched/idle: Use explicit broadcast oneshot > > control function) replaced clockevents_notify() invocations in > > cpuidle_idle_call() with direct calls to tick_broadcast_enter() > > and tick_broadcast_exit(), but it overlooked the fact that > > interrupts were already enabled before calling the latter which > > led to functional breakage on systems using idle states with the > > CPUIDLE_FLAG_TIMER_STOP flag set. > > > > Fix that by moving the invocations of tick_broadcast_enter() > > and tick_broadcast_exit() down into cpuidle_enter_state() where > > interrupts are still disabled when tick_broadcast_exit() is > > called. Also ensure that interrupts will be disabled before > > running tick_broadcast_exit() even if they have been enabled by > > the idle state's ->enter callback. Trigger a WARN_ON_ONCE() in > > that case, as we generally don't want that to happen for states > > with CPUIDLE_FLAG_TIMER_STOP set. > > Incidentally I was debugging this issue as well when I saw this thread. > > And it turns out that I did report this issue 2 months ago: > http://article.gmane.org/gmane.linux.kernel/1892049 > What happened? The patch series had been picked up by someone else (me), reordered and rebased in the meantime and your report was missed. Sorry about that. > > Fixes: 335f49196fd6 (sched/idle: Use explicit broadcast oneshot control function) > > Reported-and-tested-by: Linus Walleij > > Acked-by: Peter Zijlstra (Intel) > > Acked-by: Daniel Lezcano > > Reported-and-tested-by: Sudeep Holla > > Signed-off-by: Rafael J. Wysocki > > Tested-by: Nicolas Pitre Thanks! -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.