]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
arch/tile: add "nop" after "nap" to help GX idle power draw
authorChris Metcalf <cmetcalf@tilera.com>
Thu, 29 Mar 2012 19:57:18 +0000 (15:57 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Fri, 30 Mar 2012 22:56:36 +0000 (18:56 -0400)
This avoids the hardware istream prefetcher doing unnecessary work.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
arch/tile/kernel/entry.S
arch/tile/kernel/smp.c

index f8d61558b5e40c9f838f2baf5e4509a39c3944c2..133c4b56a99ec7196c59f9dca60742953826bf75 100644 (file)
@@ -85,6 +85,7 @@ STD_ENTRY(cpu_idle_on_new_stack)
 /* Loop forever on a nap during SMP boot. */
 STD_ENTRY(smp_nap)
        nap
+       nop       /* avoid provoking the icache prefetch with a jump */
        j smp_nap /* we are not architecturally guaranteed not to exit nap */
        jrp lr    /* clue in the backtracer */
        STD_ENDPROC(smp_nap)
@@ -106,5 +107,6 @@ STD_ENTRY(_cpu_idle)
        .global _cpu_idle_nap
 _cpu_idle_nap:
        nap
+       nop       /* avoid provoking the icache prefetch with a jump */
        jrp lr
        STD_ENDPROC(_cpu_idle)
index 757960790cf045e5360a63ccb441f5423c9037e3..f86887aebaad9f7a4a509f1e453478592fcd8dfe 100644 (file)
@@ -122,7 +122,7 @@ static void smp_stop_cpu_interrupt(void)
        set_cpu_online(smp_processor_id(), 0);
        arch_local_irq_disable_all();
        for (;;)
-               asm("nap");
+               asm("nap; nop");
 }
 
 /* This function calls the 'stop' function on all other CPUs in the system. */