Revert "cpuidle, intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE *again*"
authorSasha Levin <sashal@kernel.org>
Wed, 5 Apr 2023 11:31:15 +0000 (07:31 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Apr 2023 10:10:58 +0000 (12:10 +0200)
This reverts commit 07fc78d8f0c960f7ca241de98bc8c6bfe7d200f3 which was
upstream commit 6d9c7f51b1d9179bf7c3542267c656a934e8af23.

Lockdep warnings on boot that are not seen with Linus's tree.

Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/idle/intel_idle.c

index f060ac7376e69b8994fc2617612de9755a33cd75..cfeb24d40d3789b8bfbfedd7ba2ad0b7fecec885 100644 (file)
@@ -168,7 +168,13 @@ static __cpuidle int intel_idle_irq(struct cpuidle_device *dev,
 
        raw_local_irq_enable();
        ret = __intel_idle(dev, drv, index);
-       raw_local_irq_disable();
+
+       /*
+        * The lockdep hardirqs state may be changed to 'on' with timer
+        * tick interrupt followed by __do_softirq(). Use local_irq_disable()
+        * to keep the hardirqs state correct.
+        */
+       local_irq_disable();
 
        return ret;
 }