Skip to content

Commit 507efd6

Browse files
Sven Schnellehdeller
authored andcommitted
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>
1 parent 08e6978 commit 507efd6

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

‎arch/parisc/include/asm/pdc.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ int pdc_sti_call(unsigned long func, unsigned long flags,
9191
unsigned long inptr, unsigned long outputr,
9292
unsigned long glob_cfg);
9393

94+
int __pdc_cpu_rendezvous(void);
9495
static inline char * os_id_to_string(u16 os_id) {
9596
switch(os_id) {
9697
case OS_ID_NONE: return "No OS";

‎arch/parisc/kernel/firmware.c‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,19 @@ int pdc_chassis_disp(unsigned long disp)
311311
return retval;
312312
}
313313

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+
314327
/**
315328
* pdc_chassis_warn - Fetches chassis warnings
316329
* @retval: -1 on error, 0 on success

‎arch/parisc/kernel/smp.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ halt_processor(void)
109109
/* REVISIT : does PM *know* this CPU isn't available? */
110110
set_cpu_online(smp_processor_id(), false);
111111
local_irq_disable();
112+
__pdc_cpu_rendezvous();
112113
for (;;)
113114
;
114115
}

0 commit comments

Comments
 (0)