Commit 507efd63 authored by Sven Schnelle's avatar Sven Schnelle Committed by Helge Deller

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: default avatarSven Schnelle <svens@stackframe.org>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 08e69780
...@@ -91,6 +91,7 @@ int pdc_sti_call(unsigned long func, unsigned long flags, ...@@ -91,6 +91,7 @@ int pdc_sti_call(unsigned long func, unsigned long flags,
unsigned long inptr, unsigned long outputr, unsigned long inptr, unsigned long outputr,
unsigned long glob_cfg); unsigned long glob_cfg);
int __pdc_cpu_rendezvous(void);
static inline char * os_id_to_string(u16 os_id) { static inline char * os_id_to_string(u16 os_id) {
switch(os_id) { switch(os_id) {
case OS_ID_NONE: return "No OS"; case OS_ID_NONE: return "No OS";
......
...@@ -311,6 +311,19 @@ int pdc_chassis_disp(unsigned long disp) ...@@ -311,6 +311,19 @@ int pdc_chassis_disp(unsigned long disp)
return retval; return retval;
} }
/**
* pdc_cpu_rendenzvous - Stop currently executing CPU
* @retval: -1 on error, 0 on success
*/
int __pdc_cpu_rendezvous(void)
{
if (is_pdc_pat())
return mem_pdc_call(PDC_PAT_CPU, PDC_PAT_CPU_RENDEZVOUS);
else
return mem_pdc_call(PDC_PROC, 1, 0);
}
/** /**
* pdc_chassis_warn - Fetches chassis warnings * pdc_chassis_warn - Fetches chassis warnings
* @retval: -1 on error, 0 on success * @retval: -1 on error, 0 on success
......
...@@ -109,6 +109,7 @@ halt_processor(void) ...@@ -109,6 +109,7 @@ halt_processor(void)
/* REVISIT : does PM *know* this CPU isn't available? */ /* REVISIT : does PM *know* this CPU isn't available? */
set_cpu_online(smp_processor_id(), false); set_cpu_online(smp_processor_id(), false);
local_irq_disable(); local_irq_disable();
__pdc_cpu_rendezvous();
for (;;) for (;;)
; ;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment