diff options
Diffstat (limited to 'arch/arm64/kernel/process.c')
-rw-r--r-- | arch/arm64/kernel/process.c | 43 |
1 files changed, 5 insertions, 38 deletions
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 0337cdb0667b..83a0ad5936a5 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c | |||
@@ -84,11 +84,15 @@ EXPORT_SYMBOL_GPL(pm_power_off); | |||
84 | void (*pm_restart)(const char *cmd); | 84 | void (*pm_restart)(const char *cmd); |
85 | EXPORT_SYMBOL_GPL(pm_restart); | 85 | EXPORT_SYMBOL_GPL(pm_restart); |
86 | 86 | ||
87 | void arch_cpu_idle_prepare(void) | ||
88 | { | ||
89 | local_fiq_enable(); | ||
90 | } | ||
87 | 91 | ||
88 | /* | 92 | /* |
89 | * This is our default idle handler. | 93 | * This is our default idle handler. |
90 | */ | 94 | */ |
91 | static void default_idle(void) | 95 | void arch_cpu_idle(void) |
92 | { | 96 | { |
93 | /* | 97 | /* |
94 | * This should do all the clock switching and wait for interrupt | 98 | * This should do all the clock switching and wait for interrupt |
@@ -98,43 +102,6 @@ static void default_idle(void) | |||
98 | local_irq_enable(); | 102 | local_irq_enable(); |
99 | } | 103 | } |
100 | 104 | ||
101 | /* | ||
102 | * The idle thread. | ||
103 | * We always respect 'hlt_counter' to prevent low power idle. | ||
104 | */ | ||
105 | void cpu_idle(void) | ||
106 | { | ||
107 | local_fiq_enable(); | ||
108 | |||
109 | /* endless idle loop with no priority at all */ | ||
110 | while (1) { | ||
111 | tick_nohz_idle_enter(); | ||
112 | rcu_idle_enter(); | ||
113 | while (!need_resched()) { | ||
114 | /* | ||
115 | * We need to disable interrupts here to ensure | ||
116 | * we don't miss a wakeup call. | ||
117 | */ | ||
118 | local_irq_disable(); | ||
119 | if (!need_resched()) { | ||
120 | stop_critical_timings(); | ||
121 | default_idle(); | ||
122 | start_critical_timings(); | ||
123 | /* | ||
124 | * default_idle functions should always return | ||
125 | * with IRQs enabled. | ||
126 | */ | ||
127 | WARN_ON(irqs_disabled()); | ||
128 | } else { | ||
129 | local_irq_enable(); | ||
130 | } | ||
131 | } | ||
132 | rcu_idle_exit(); | ||
133 | tick_nohz_idle_exit(); | ||
134 | schedule_preempt_disabled(); | ||
135 | } | ||
136 | } | ||
137 | |||
138 | void machine_shutdown(void) | 105 | void machine_shutdown(void) |
139 | { | 106 | { |
140 | #ifdef CONFIG_SMP | 107 | #ifdef CONFIG_SMP |