[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 11 of 11] arm: Put the CPU into a sleep state in the idle loop
# HG changeset patch # User Tim Deegan <tim@xxxxxxx> # Date 1331311596 0 # Node ID 258d71e6c048bcfda4fa35cd9addfe1f0c4461ef # Parent ec6712d0af2786332af7dd6f6caab50878bc96d0 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> diff -r ec6712d0af27 -r 258d71e6c048 xen/arch/arm/domain.c --- a/xen/arch/arm/domain.c Fri Mar 09 16:46:35 2012 +0000 +++ b/xen/arch/arm/domain.c Fri Mar 09 16:46:36 2012 +0000 @@ -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(); } _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |