Commit fb380aadfe34e8d3ce628cb3e386882351940874
Committed by
Martin Schwidefsky
1 parent
957a37ad58
Exists in
master
and in
7 other branches
[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>
Showing 5 changed files with 18 additions and 8 deletions Side-by-side Diff
arch/s390/include/asm/sigp.h
... | ... | @@ -15,12 +15,20 @@ |
15 | 15 | #ifndef __SIGP__ |
16 | 16 | #define __SIGP__ |
17 | 17 | |
18 | -#include <asm/ptrace.h> | |
19 | -#include <asm/atomic.h> | |
18 | +#include <asm/system.h> | |
20 | 19 | |
21 | 20 | /* get real cpu address from logical cpu number */ |
22 | 21 | extern int __cpu_logical_map[]; |
23 | 22 | |
23 | +static 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 | + | |
24 | 32 | typedef enum |
25 | 33 | { |
26 | 34 | sigp_unassigned=0x0, |
... | ... | @@ -79,7 +87,7 @@ |
79 | 87 | " ipm %0\n" |
80 | 88 | " srl %0,28\n" |
81 | 89 | : "=d" (ccode) |
82 | - : "d" (reg1), "d" (__cpu_logical_map[cpu_addr]), | |
90 | + : "d" (reg1), "d" (cpu_logical_map(cpu_addr)), | |
83 | 91 | "a" (order_code) : "cc" , "memory"); |
84 | 92 | return ccode; |
85 | 93 | } |
... | ... | @@ -98,7 +106,7 @@ |
98 | 106 | " ipm %0\n" |
99 | 107 | " srl %0,28\n" |
100 | 108 | : "=d" (ccode) |
101 | - : "d" (reg1), "d" (__cpu_logical_map[cpu_addr]), | |
109 | + : "d" (reg1), "d" (cpu_logical_map(cpu_addr)), | |
102 | 110 | "a" (order_code) : "cc" , "memory"); |
103 | 111 | return ccode; |
104 | 112 | } |
... | ... | @@ -118,7 +126,7 @@ |
118 | 126 | " ipm %0\n" |
119 | 127 | " srl %0,28\n" |
120 | 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 | 130 | : "cc" , "memory"); |
123 | 131 | *statusptr = reg1; |
124 | 132 | return ccode; |
arch/s390/kernel/setup.c
arch/s390/kernel/smp.c
arch/s390/kernel/topology.c
... | ... | @@ -114,7 +114,7 @@ |
114 | 114 | |
115 | 115 | rcpu = CPU_BITS - 1 - cpu + tl_cpu->origin; |
116 | 116 | for_each_present_cpu(lcpu) { |
117 | - if (__cpu_logical_map[lcpu] == rcpu) { | |
117 | + if (cpu_logical_map(lcpu) == rcpu) { | |
118 | 118 | cpu_set(lcpu, core->mask); |
119 | 119 | smp_cpu_polarization[lcpu] = tl_cpu->pp; |
120 | 120 | } |