summaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/smp_32.h
diff options
context:
space:
mode:
authorKonrad Eisele <konrad@gaisler.com>2009-08-31 22:08:13 +0000
committerDavid S. Miller <davem@davemloft.net>2009-11-02 04:19:42 -0800
commit8401707ff645521e9f21cbb8fe3b138f60e85680 (patch)
tree114287cf273b57f96d0e132cd2274c7afe60b120 /arch/sparc/include/asm/smp_32.h
parentb6727b12dd2ffb4a890eb5b13a298230c29ba45d (diff)
downloadlinux-8401707ff645521e9f21cbb8fe3b138f60e85680.tar.bz2
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.h9
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)
return cpuid;
}
+extern inline int hard_smpleon_processor_id(void)
+{
+ int cpuid;
+ __asm__ __volatile__("rd %%asr17,%0\n\t"
+ "srl %0,28,%0" :
+ "=&r" (cpuid) : );
+ return cpuid;
+}
+
#ifndef MODULE
static inline int hard_smp_processor_id(void)
{