aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/percpu.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-08-18 00:07:40 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-08-20 23:40:00 -0700
commit195f7fd0a7e2b3179d52aa8ed6de3637203946c6 (patch)
tree7737c243489bed4bd23db45f3ced089ebf24a8ce /include/asm-sparc64/percpu.h
parentdio: zero struct dio with kzalloc instead of manually (diff)
downloadlinux-dev-195f7fd0a7e2b3179d52aa8ed6de3637203946c6.tar.xz
linux-dev-195f7fd0a7e2b3179d52aa8ed6de3637203946c6.zip
[SPARC64]: Need to clobber global reg vars in switch_to().
Otherwise the compiler can't see the things like the per-cpu area base register are changing. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc64/percpu.h')
-rw-r--r--include/asm-sparc64/percpu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-sparc64/percpu.h b/include/asm-sparc64/percpu.h
index caf8750792ff..a1f53a4da405 100644
--- a/include/asm-sparc64/percpu.h
+++ b/include/asm-sparc64/percpu.h
@@ -3,6 +3,8 @@
#include <linux/compiler.h>
+register unsigned long __local_per_cpu_offset asm("g5");
+
#ifdef CONFIG_SMP
#define setup_per_cpu_areas() do { } while (0)
@@ -23,8 +25,6 @@ extern unsigned long __per_cpu_shift;
__typeof__(type) per_cpu__##name \
____cacheline_aligned_in_smp
-register unsigned long __local_per_cpu_offset asm("g5");
-
/* var is in discarded region: offset to particular copy we want */
#define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu)))
#define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __local_per_cpu_offset))