diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-08-18 03:07:40 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-08-21 02:40:00 -0400 |
commit | 195f7fd0a7e2b3179d52aa8ed6de3637203946c6 (patch) | |
tree | 7737c243489bed4bd23db45f3ced089ebf24a8ce /include/asm-sparc64/percpu.h | |
parent | 848c4dd5153c7a0de55470ce99a8e13a63b4703f (diff) |
[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.h | 4 |
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 @@ | |||
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | 5 | ||
6 | register unsigned long __local_per_cpu_offset asm("g5"); | ||
7 | |||
6 | #ifdef CONFIG_SMP | 8 | #ifdef CONFIG_SMP |
7 | 9 | ||
8 | #define setup_per_cpu_areas() do { } while (0) | 10 | #define setup_per_cpu_areas() do { } while (0) |
@@ -23,8 +25,6 @@ extern unsigned long __per_cpu_shift; | |||
23 | __typeof__(type) per_cpu__##name \ | 25 | __typeof__(type) per_cpu__##name \ |
24 | ____cacheline_aligned_in_smp | 26 | ____cacheline_aligned_in_smp |
25 | 27 | ||
26 | register unsigned long __local_per_cpu_offset asm("g5"); | ||
27 | |||
28 | /* var is in discarded region: offset to particular copy we want */ | 28 | /* var is in discarded region: offset to particular copy we want */ |
29 | #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu))) | 29 | #define per_cpu(var, cpu) (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset(cpu))) |
30 | #define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __local_per_cpu_offset)) | 30 | #define __get_cpu_var(var) (*RELOC_HIDE(&per_cpu__##var, __local_per_cpu_offset)) |