summaryrefslogtreecommitdiff
path: root/drivers/cpuidle
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-06-25 13:52:53 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-06-25 13:52:53 +0200
commit10e8b11eb3195e11450c509d4dd3984d707a4167 (patch)
tree03cd14b0f8d81868677bec9b96aef93622111687 /drivers/cpuidle
parent81e6737518a1e392ead4e568a4ee70bb7c371458 (diff)
downloadlwn-10e8b11eb3195e11450c509d4dd3984d707a4167.tar.gz
lwn-10e8b11eb3195e11450c509d4dd3984d707a4167.zip
cpuidle: Rearrange s2idle-specific idle state entry code
Implement call_cpuidle_s2idle() in analogy with call_cpuidle() for the s2idle-specific idle state entry and invoke it from cpuidle_idle_call() to make the s2idle-specific idle entry code path look more similar to the "regular" idle entry one. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Chen Yu <yu.c.chen@intel.com>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r--drivers/cpuidle/cpuidle.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index e092789187c6..87197319ab06 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -13,7 +13,6 @@
#include <linux/mutex.h>
#include <linux/sched.h>
#include <linux/sched/clock.h>
-#include <linux/sched/idle.h>
#include <linux/notifier.h>
#include <linux/pm_qos.h>
#include <linux/cpu.h>
@@ -187,9 +186,10 @@ int cpuidle_enter_s2idle(struct cpuidle_driver *drv, struct cpuidle_device *dev)
* be frozen safely.
*/
index = find_deepest_state(drv, dev, U64_MAX, 0, true);
- if (index > 0 && !current_clr_polling_and_test())
+ if (index > 0) {
enter_s2idle_proper(drv, dev, index);
-
+ local_irq_enable();
+ }
return index;
}
#endif /* CONFIG_SUSPEND */