mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
arm: Put the CPU into a sleep state in the idle loop
The ARM doesn't actually say that the WFI instruction will return immediately if CPSR.I is clear and an instruction is pending, but this seems to match up with how linux uses it. Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
e1147447b9
commit
d6df660742
1 file changed
+5
-1
@@ -34,7 +34,11 @@ void idle_loop(void)
|
||||
if ( cpu_is_offline(smp_processor_id()) )
|
||||
stop_cpu();
|
||||
|
||||
/* TODO: (*pm_idle)(); */
|
||||
local_irq_disable();
|
||||
if ( cpu_is_haltable(smp_processor_id()) )
|
||||
asm volatile ("dsb; wfi");
|
||||
local_irq_enable();
|
||||
|
||||
do_tasklet();
|
||||
do_softirq();
|
||||
}
|
||||
|
||||