Commit 8c92ba6c327ee5089dec1e92eaa82927bee63d6d

Authored by Chris Metcalf
1 parent bfffe79bc2

arch/tile: add "nop" after "nap" to help GX idle power draw

This avoids the hardware istream prefetcher doing unnecessary work.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>

Showing 2 changed files with 3 additions and 1 deletions Side-by-side Diff

arch/tile/kernel/entry.S
... ... @@ -85,6 +85,7 @@
85 85 /* Loop forever on a nap during SMP boot. */
86 86 STD_ENTRY(smp_nap)
87 87 nap
  88 + nop /* avoid provoking the icache prefetch with a jump */
88 89 j smp_nap /* we are not architecturally guaranteed not to exit nap */
89 90 jrp lr /* clue in the backtracer */
90 91 STD_ENDPROC(smp_nap)
... ... @@ -105,6 +106,7 @@
105 106 .global _cpu_idle_nap
106 107 _cpu_idle_nap:
107 108 nap
  109 + nop /* avoid provoking the icache prefetch with a jump */
108 110 jrp lr
109 111 STD_ENDPROC(_cpu_idle)
arch/tile/kernel/smp.c
... ... @@ -103,7 +103,7 @@
103 103 set_cpu_online(smp_processor_id(), 0);
104 104 arch_local_irq_disable_all();
105 105 for (;;)
106   - asm("nap");
  106 + asm("nap; nop");
107 107 }
108 108  
109 109 /* This function calls the 'stop' function on all other CPUs in the system. */