aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2010-01-13 14:44:37 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-01-13 14:44:45 -0500
commitfb380aadfe34e8d3ce628cb3e386882351940874 (patch)
tree2607a2f3ee9732516d01a2e5083fbea0476491bb /arch/s390/include
parent957a37ad587f3ef1022f1fe434d818cbed38eb95 (diff)
[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')
-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 @@
15#ifndef __SIGP__ 15#ifndef __SIGP__
16#define __SIGP__ 16#define __SIGP__
17 17
18#include <asm/ptrace.h> 18#include <asm/system.h>
19#include <asm/atomic.h>
20 19
21/* get real cpu address from logical cpu number */ 20/* get real cpu address from logical cpu number */
22extern int __cpu_logical_map[]; 21extern int __cpu_logical_map[];
23 22
23static inline int cpu_logical_map(int cpu)
24{
25#ifdef CONFIG_SMP
26 return __cpu_logical_map[cpu];
27#else
28 return stap();
29#endif
30}
31
24typedef enum 32typedef enum
25{ 33{
26 sigp_unassigned=0x0, 34 sigp_unassigned=0x0,
@@ -79,7 +87,7 @@ signal_processor(__u16 cpu_addr, sigp_order_code order_code)
79 " ipm %0\n" 87 " ipm %0\n"
80 " srl %0,28\n" 88 " srl %0,28\n"
81 : "=d" (ccode) 89 : "=d" (ccode)
82 : "d" (reg1), "d" (__cpu_logical_map[cpu_addr]), 90 : "d" (reg1), "d" (cpu_logical_map(cpu_addr)),
83 "a" (order_code) : "cc" , "memory"); 91 "a" (order_code) : "cc" , "memory");
84 return ccode; 92 return ccode;
85} 93}
@@ -98,7 +106,7 @@ signal_processor_p(__u32 parameter, __u16 cpu_addr, sigp_order_code order_code)
98 " ipm %0\n" 106 " ipm %0\n"
99 " srl %0,28\n" 107 " srl %0,28\n"
100 : "=d" (ccode) 108 : "=d" (ccode)
101 : "d" (reg1), "d" (__cpu_logical_map[cpu_addr]), 109 : "d" (reg1), "d" (cpu_logical_map(cpu_addr)),
102 "a" (order_code) : "cc" , "memory"); 110 "a" (order_code) : "cc" , "memory");
103 return ccode; 111 return ccode;
104} 112}
@@ -118,7 +126,7 @@ signal_processor_ps(__u32 *statusptr, __u32 parameter, __u16 cpu_addr,
118 " ipm %0\n" 126 " ipm %0\n"
119 " srl %0,28\n" 127 " srl %0,28\n"
120 : "=d" (ccode), "+d" (reg1) 128 : "=d" (ccode), "+d" (reg1)
121 : "d" (__cpu_logical_map[cpu_addr]), "a" (order_code) 129 : "d" (cpu_logical_map(cpu_addr)), "a" (order_code)
122 : "cc" , "memory"); 130 : "cc" , "memory");
123 *statusptr = reg1; 131 *statusptr = reg1;
124 return ccode; 132 return ccode;