diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-09-11 04:29:05 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-09-11 04:29:56 -0400 |
commit | 5c0b912e755caaad555eb6feefdb1124462d8f37 (patch) | |
tree | 94911d8d9a9cb53faeb78bb2396984f64c31f2c2 /arch/s390/kernel/smp.c | |
parent | e86a6ed63f46fe8fb555fda531084bca3ef62fd7 (diff) |
[S390] Remove smp_cpu_not_running.
smp_cpu_not_running() and cpu_stopped() are doing the same.
Remove one and also get rid of the last hard_smp_processor_id() leftover.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/smp.c')
-rw-r--r-- | arch/s390/kernel/smp.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 9261495ca2c3..56c16876b919 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -71,6 +71,23 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices); | |||
71 | 71 | ||
72 | static void smp_ext_bitcall(int, ec_bit_sig); | 72 | static void smp_ext_bitcall(int, ec_bit_sig); |
73 | 73 | ||
74 | static int cpu_stopped(int cpu) | ||
75 | { | ||
76 | __u32 status; | ||
77 | |||
78 | switch (signal_processor_ps(&status, 0, cpu, sigp_sense)) { | ||
79 | case sigp_order_code_accepted: | ||
80 | case sigp_status_stored: | ||
81 | /* Check for stopped and check stop state */ | ||
82 | if (status & 0x50) | ||
83 | return 1; | ||
84 | break; | ||
85 | default: | ||
86 | break; | ||
87 | } | ||
88 | return 0; | ||
89 | } | ||
90 | |||
74 | void smp_send_stop(void) | 91 | void smp_send_stop(void) |
75 | { | 92 | { |
76 | int cpu, rc; | 93 | int cpu, rc; |
@@ -87,7 +104,7 @@ void smp_send_stop(void) | |||
87 | rc = signal_processor(cpu, sigp_stop); | 104 | rc = signal_processor(cpu, sigp_stop); |
88 | } while (rc == sigp_busy); | 105 | } while (rc == sigp_busy); |
89 | 106 | ||
90 | while (!smp_cpu_not_running(cpu)) | 107 | while (!cpu_stopped(cpu)) |
91 | cpu_relax(); | 108 | cpu_relax(); |
92 | } | 109 | } |
93 | } | 110 | } |
@@ -270,19 +287,6 @@ static inline void smp_get_save_area(unsigned int cpu, unsigned int phy_cpu) { } | |||
270 | 287 | ||
271 | #endif /* CONFIG_ZFCPDUMP */ | 288 | #endif /* CONFIG_ZFCPDUMP */ |
272 | 289 | ||
273 | static int cpu_stopped(int cpu) | ||
274 | { | ||
275 | __u32 status; | ||
276 | |||
277 | /* Check for stopped state */ | ||
278 | if (signal_processor_ps(&status, 0, cpu, sigp_sense) == | ||
279 | sigp_status_stored) { | ||
280 | if (status & 0x40) | ||
281 | return 1; | ||
282 | } | ||
283 | return 0; | ||
284 | } | ||
285 | |||
286 | static int cpu_known(int cpu_id) | 290 | static int cpu_known(int cpu_id) |
287 | { | 291 | { |
288 | int cpu; | 292 | int cpu; |
@@ -636,7 +640,7 @@ int __cpu_disable(void) | |||
636 | void __cpu_die(unsigned int cpu) | 640 | void __cpu_die(unsigned int cpu) |
637 | { | 641 | { |
638 | /* Wait until target cpu is down */ | 642 | /* Wait until target cpu is down */ |
639 | while (!smp_cpu_not_running(cpu)) | 643 | while (!cpu_stopped(cpu)) |
640 | cpu_relax(); | 644 | cpu_relax(); |
641 | smp_free_lowcore(cpu); | 645 | smp_free_lowcore(cpu); |
642 | pr_info("Processor %d stopped\n", cpu); | 646 | pr_info("Processor %d stopped\n", cpu); |