summaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/sigp.h
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2010-01-13 20:44:37 +0100
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-01-13 20:44:45 +0100
commitfb380aadfe34e8d3ce628cb3e386882351940874 (patch)
tree2607a2f3ee9732516d01a2e5083fbea0476491bb /arch/s390/include/asm/sigp.h
parent957a37ad587f3ef1022f1fe434d818cbed38eb95 (diff)
downloadlinux-fb380aadfe34e8d3ce628cb3e386882351940874.tar.gz
linux-fb380aadfe34e8d3ce628cb3e386882351940874.tar.bz2
linux-fb380aadfe34e8d3ce628cb3e386882351940874.zip
[S390] Move __cpu_logical_map to smp.c
Finally move it to the place where it belongs to and make get rid of it for !CONFIG_SMP. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/sigp.h')
-rw-r--r--arch/s390/include/asm/sigp.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/s390/include/asm/sigp.h b/arch/s390/include/asm/sigp.h
index 0cc620a6a2cc..f72d611f7e13 100644
--- a/arch/s390/include/asm/sigp.h
+++ b/arch/s390/include/asm/sigp.h
@@ -15,12 +15,20 @@
#ifndef __SIGP__
#define __SIGP__
-#include <asm/ptrace.h>
-#include <asm/atomic.h>
+#include <asm/system.h>
/* get real cpu address from logical cpu number */
extern int __cpu_logical_map[];
+static inline int cpu_logical_map(int cpu)
+{
+#ifdef CONFIG_SMP
+ return __cpu_logical_map[cpu];
+#else
+ return stap();
+#endif
+}
+
typedef enum
{
sigp_unassigned=0x0,
@@ -79,7 +87,7 @@ signal_processor(__u16 cpu_addr, sigp_order_code order_code)
" ipm %0\n"
" srl %0,28\n"
: "=d" (ccode)
- : "d" (reg1), "d" (__cpu_logical_map[cpu_addr]),
+ : "d" (reg1), "d" (cpu_logical_map(cpu_addr)),
"a" (order_code) : "cc" , "memory");
return ccode;
}
@@ -98,7 +106,7 @@ signal_processor_p(__u32 parameter, __u16 cpu_addr, sigp_order_code order_code)
" ipm %0\n"
" srl %0,28\n"
: "=d" (ccode)
- : "d" (reg1), "d" (__cpu_logical_map[cpu_addr]),
+ : "d" (reg1), "d" (cpu_logical_map(cpu_addr)),
"a" (order_code) : "cc" , "memory");
return ccode;
}
@@ -118,7 +126,7 @@ signal_processor_ps(__u32 *statusptr, __u32 parameter, __u16 cpu_addr,
" ipm %0\n"
" srl %0,28\n"
: "=d" (ccode), "+d" (reg1)
- : "d" (__cpu_logical_map[cpu_addr]), "a" (order_code)
+ : "d" (cpu_logical_map(cpu_addr)), "a" (order_code)
: "cc" , "memory");
*statusptr = reg1;
return ccode;