diff options
author | Konrad Eisele <konrad@gaisler.com> | 2009-08-31 18:08:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-02 07:19:42 -0500 |
commit | 8401707ff645521e9f21cbb8fe3b138f60e85680 (patch) | |
tree | 114287cf273b57f96d0e132cd2274c7afe60b120 /arch/sparc/include/asm/smp_32.h | |
parent | b6727b12dd2ffb4a890eb5b13a298230c29ba45d (diff) |
sparc,leon: Sparc-Leon SMP support
Support SMP for a Sparc-Leon multiprocessor system.
Add Leon specific SMP code to arch/sparc/kernel/leon_smp.c.
Signed-off-by: Konrad Eisele <konrad@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/smp_32.h')
-rw-r--r-- | arch/sparc/include/asm/smp_32.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/smp_32.h b/arch/sparc/include/asm/smp_32.h index 58101dc70493..841905c10215 100644 --- a/arch/sparc/include/asm/smp_32.h +++ b/arch/sparc/include/asm/smp_32.h | |||
@@ -106,6 +106,15 @@ static inline int hard_smp4d_processor_id(void) | |||
106 | return cpuid; | 106 | return cpuid; |
107 | } | 107 | } |
108 | 108 | ||
109 | extern inline int hard_smpleon_processor_id(void) | ||
110 | { | ||
111 | int cpuid; | ||
112 | __asm__ __volatile__("rd %%asr17,%0\n\t" | ||
113 | "srl %0,28,%0" : | ||
114 | "=&r" (cpuid) : ); | ||
115 | return cpuid; | ||
116 | } | ||
117 | |||
109 | #ifndef MODULE | 118 | #ifndef MODULE |
110 | static inline int hard_smp_processor_id(void) | 119 | static inline int hard_smp_processor_id(void) |
111 | { | 120 | { |