aboutsummaryrefslogtreecommitdiffstats
path: root/xen
diff options
context:
space:
mode:
authorTim Deegan <tim@xen.org>2012-03-13 15:11:00 +0000
committerTim Deegan <tim@xen.org>2012-03-13 15:11:00 +0000
commitd6df6607425f170ac601ba3559ea253fed4f0511 (patch)
treec9a3b959341fed4292d5c61d841589cd1d61b7c4 /xen
parente1147447b9257629e72aafed6e6f7f0353d15e65 (diff)
downloadxen-d6df6607425f170ac601ba3559ea253fed4f0511.tar.gz
xen-d6df6607425f170ac601ba3559ea253fed4f0511.tar.bz2
xen-d6df6607425f170ac601ba3559ea253fed4f0511.zip
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>
Diffstat (limited to 'xen')
-rw-r--r--xen/arch/arm/domain.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index e1d500df5c..edaff2252a 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -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();
}