diff options
author | Sven Schnelle <svens@stackframe.org> | 2019-09-08 05:33:03 -0400 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2019-09-08 09:19:58 -0400 |
commit | 507efd63d98c4437d62bbfa932b322e72723e1fc (patch) | |
tree | 6c9d7283f37f68b9153e0025b1703fa01b69d820 /arch/parisc | |
parent | 08e697808f6823fa5dc833a344700f60b25a59d4 (diff) |
parisc: add __pdc_cpu_rendezvous()
When stopping SMP cpus send them into rendezvous, so we can
start them again later (when kexec'ing a new kernel).
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/include/asm/pdc.h | 1 | ||||
-rw-r--r-- | arch/parisc/kernel/firmware.c | 13 | ||||
-rw-r--r-- | arch/parisc/kernel/smp.c | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/arch/parisc/include/asm/pdc.h b/arch/parisc/include/asm/pdc.h index 19bb2e46cd36..b388d8176588 100644 --- a/arch/parisc/include/asm/pdc.h +++ b/arch/parisc/include/asm/pdc.h | |||
@@ -91,6 +91,7 @@ int pdc_sti_call(unsigned long func, unsigned long flags, | |||
91 | unsigned long inptr, unsigned long outputr, | 91 | unsigned long inptr, unsigned long outputr, |
92 | unsigned long glob_cfg); | 92 | unsigned long glob_cfg); |
93 | 93 | ||
94 | int __pdc_cpu_rendezvous(void); | ||
94 | static inline char * os_id_to_string(u16 os_id) { | 95 | static inline char * os_id_to_string(u16 os_id) { |
95 | switch(os_id) { | 96 | switch(os_id) { |
96 | case OS_ID_NONE: return "No OS"; | 97 | case OS_ID_NONE: return "No OS"; |
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index 58cc08e7fd12..1d976f2ebff0 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c | |||
@@ -312,6 +312,19 @@ int pdc_chassis_disp(unsigned long disp) | |||
312 | } | 312 | } |
313 | 313 | ||
314 | /** | 314 | /** |
315 | * pdc_cpu_rendenzvous - Stop currently executing CPU | ||
316 | * @retval: -1 on error, 0 on success | ||
317 | */ | ||
318 | int __pdc_cpu_rendezvous(void) | ||
319 | { | ||
320 | if (is_pdc_pat()) | ||
321 | return mem_pdc_call(PDC_PAT_CPU, PDC_PAT_CPU_RENDEZVOUS); | ||
322 | else | ||
323 | return mem_pdc_call(PDC_PROC, 1, 0); | ||
324 | } | ||
325 | |||
326 | |||
327 | /** | ||
315 | * pdc_chassis_warn - Fetches chassis warnings | 328 | * pdc_chassis_warn - Fetches chassis warnings |
316 | * @retval: -1 on error, 0 on success | 329 | * @retval: -1 on error, 0 on success |
317 | */ | 330 | */ |
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index cbd074ba22da..e202c37e56af 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
@@ -109,6 +109,7 @@ halt_processor(void) | |||
109 | /* REVISIT : does PM *know* this CPU isn't available? */ | 109 | /* REVISIT : does PM *know* this CPU isn't available? */ |
110 | set_cpu_online(smp_processor_id(), false); | 110 | set_cpu_online(smp_processor_id(), false); |
111 | local_irq_disable(); | 111 | local_irq_disable(); |
112 | __pdc_cpu_rendezvous(); | ||
112 | for (;;) | 113 | for (;;) |
113 | ; | 114 | ; |
114 | } | 115 | } |