diff options
Diffstat (limited to 'kernel/sched/idle.c')
-rw-r--r-- | kernel/sched/idle.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index aaf1c1d5cf5d..94b2d7b88a27 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/tick.h> | 7 | #include <linux/tick.h> |
8 | #include <linux/mm.h> | 8 | #include <linux/mm.h> |
9 | #include <linux/stackprotector.h> | 9 | #include <linux/stackprotector.h> |
10 | #include <linux/suspend.h> | ||
10 | 11 | ||
11 | #include <asm/tlb.h> | 12 | #include <asm/tlb.h> |
12 | 13 | ||
@@ -105,6 +106,21 @@ static void cpuidle_idle_call(void) | |||
105 | rcu_idle_enter(); | 106 | rcu_idle_enter(); |
106 | 107 | ||
107 | /* | 108 | /* |
109 | * Suspend-to-idle ("freeze") is a system state in which all user space | ||
110 | * has been frozen, all I/O devices have been suspended and the only | ||
111 | * activity happens here and in iterrupts (if any). In that case bypass | ||
112 | * the cpuidle governor and go stratight for the deepest idle state | ||
113 | * available. Possibly also suspend the local tick and the entire | ||
114 | * timekeeping to prevent timer interrupts from kicking us out of idle | ||
115 | * until a proper wakeup interrupt happens. | ||
116 | */ | ||
117 | if (idle_should_freeze()) { | ||
118 | cpuidle_enter_freeze(); | ||
119 | local_irq_enable(); | ||
120 | goto exit_idle; | ||
121 | } | ||
122 | |||
123 | /* | ||
108 | * Ask the cpuidle framework to choose a convenient idle state. | 124 | * Ask the cpuidle framework to choose a convenient idle state. |
109 | * Fall back to the default arch idle method on errors. | 125 | * Fall back to the default arch idle method on errors. |
110 | */ | 126 | */ |