[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] arm: Put the CPU into a sleep state in the idle loop



# HG changeset patch
# User Tim Deegan <tim@xxxxxxx>
# Date 1331651460 0
# Node ID 773d0367087212c43faf8cdcc21cf443b1ea0046
# Parent  a9f64424f76fd8df233297589e6070f2f557251c
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@xxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---


diff -r a9f64424f76f -r 773d03670872 xen/arch/arm/domain.c
--- a/xen/arch/arm/domain.c     Tue Mar 13 15:10:59 2012 +0000
+++ b/xen/arch/arm/domain.c     Tue Mar 13 15:11:00 2012 +0000
@@ -34,7 +34,11 @@
         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();
     }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.