diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2012-03-29 15:57:18 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2012-04-02 12:13:29 -0400 |
commit | 8c92ba6c327ee5089dec1e92eaa82927bee63d6d (patch) | |
tree | 0604093dfc61953b629a0b0889b6549dc1797d6c /arch/tile | |
parent | bfffe79bc29a9c4c817d5f51590961220e26db1a (diff) |
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>
Diffstat (limited to 'arch/tile')
-rw-r--r-- | arch/tile/kernel/entry.S | 2 | ||||
-rw-r--r-- | arch/tile/kernel/smp.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/tile/kernel/entry.S b/arch/tile/kernel/entry.S index 431e9ae60488..ec91568df880 100644 --- a/arch/tile/kernel/entry.S +++ b/arch/tile/kernel/entry.S | |||
@@ -85,6 +85,7 @@ STD_ENTRY(cpu_idle_on_new_stack) | |||
85 | /* Loop forever on a nap during SMP boot. */ | 85 | /* Loop forever on a nap during SMP boot. */ |
86 | STD_ENTRY(smp_nap) | 86 | STD_ENTRY(smp_nap) |
87 | nap | 87 | nap |
88 | nop /* avoid provoking the icache prefetch with a jump */ | ||
88 | j smp_nap /* we are not architecturally guaranteed not to exit nap */ | 89 | j smp_nap /* we are not architecturally guaranteed not to exit nap */ |
89 | jrp lr /* clue in the backtracer */ | 90 | jrp lr /* clue in the backtracer */ |
90 | STD_ENDPROC(smp_nap) | 91 | STD_ENDPROC(smp_nap) |
@@ -105,5 +106,6 @@ STD_ENTRY(_cpu_idle) | |||
105 | .global _cpu_idle_nap | 106 | .global _cpu_idle_nap |
106 | _cpu_idle_nap: | 107 | _cpu_idle_nap: |
107 | nap | 108 | nap |
109 | nop /* avoid provoking the icache prefetch with a jump */ | ||
108 | jrp lr | 110 | jrp lr |
109 | STD_ENDPROC(_cpu_idle) | 111 | STD_ENDPROC(_cpu_idle) |
diff --git a/arch/tile/kernel/smp.c b/arch/tile/kernel/smp.c index a44e103c5a63..7b6df8c27709 100644 --- a/arch/tile/kernel/smp.c +++ b/arch/tile/kernel/smp.c | |||
@@ -103,7 +103,7 @@ static void smp_stop_cpu_interrupt(void) | |||
103 | set_cpu_online(smp_processor_id(), 0); | 103 | set_cpu_online(smp_processor_id(), 0); |
104 | arch_local_irq_disable_all(); | 104 | arch_local_irq_disable_all(); |
105 | for (;;) | 105 | for (;;) |
106 | asm("nap"); | 106 | asm("nap; nop"); |
107 | } | 107 | } |
108 | 108 | ||
109 | /* This function calls the 'stop' function on all other CPUs in the system. */ | 109 | /* This function calls the 'stop' function on all other CPUs in the system. */ |