Skip to content

Commit 8c92ba6

Browse files
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>
1 parent bfffe79 commit 8c92ba6

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎arch/tile/kernel/entry.S‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ STD_ENTRY(cpu_idle_on_new_stack)
8585
/* Loop forever on a nap during SMP boot. */
8686
STD_ENTRY(smp_nap)
8787
nap
88+
nop /* avoid provoking the icache prefetch with a jump */
8889
j smp_nap /* we are not architecturally guaranteed not to exit nap */
8990
jrp lr /* clue in the backtracer */
9091
STD_ENDPROC(smp_nap)
@@ -105,5 +106,6 @@ STD_ENTRY(_cpu_idle)
105106
.global _cpu_idle_nap
106107
_cpu_idle_nap:
107108
nap
109+
nop /* avoid provoking the icache prefetch with a jump */
108110
jrp lr
109111
STD_ENDPROC(_cpu_idle)

‎arch/tile/kernel/smp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static void smp_stop_cpu_interrupt(void)
103103
set_cpu_online(smp_processor_id(), 0);
104104
arch_local_irq_disable_all();
105105
for (;;)
106-
asm("nap");
106+
asm("nap; nop");
107107
}
108108

109109
/* This function calls the 'stop' function on all other CPUs in the system. */

0 commit comments

Comments
 (0)