]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
cpuidle: Fixup IRQ state
authorPeter Zijlstra <peterz@infradead.org>
Thu, 20 Aug 2020 14:47:24 +0000 (16:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Sep 2020 17:12:21 +0000 (19:12 +0200)
[ Upstream commit 49d9c5936314e44d314c605c39cce0fd947f9c3a ]

Match the pattern elsewhere in this file.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Marco Elver <elver@google.com>
Link: https://lkml.kernel.org/r/20200821085348.251340558@infradead.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cpuidle/cpuidle.c

index 29d2d7a21bd7bad0030e3840fd77ea4b871b2c55..73f08cda21e0ef14fcbc12d7b6dca4b5fa942282 100644 (file)
@@ -148,7 +148,8 @@ static void enter_s2idle_proper(struct cpuidle_driver *drv,
         */
        stop_critical_timings();
        drv->states[index].enter_s2idle(dev, drv, index);
-       WARN_ON(!irqs_disabled());
+       if (WARN_ON_ONCE(!irqs_disabled()))
+               local_irq_disable();
        /*
         * timekeeping_resume() that will be called by tick_unfreeze() for the
         * first CPU executing it calls functions containing RCU read-side