parisc: add __pdc_cpu_rendezvous()
authorSven Schnelle <svens@stackframe.org>
Sun, 8 Sep 2019 09:33:03 +0000 (11:33 +0200)
committerHelge Deller <deller@gmx.de>
Sun, 8 Sep 2019 13:19:58 +0000 (15:19 +0200)
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>
arch/parisc/include/asm/pdc.h
arch/parisc/kernel/firmware.c
arch/parisc/kernel/smp.c

index 19bb2e46cd36cb942e275cc660f63d34fc1f0e09..b388d817658833126cc22b8d64b03ae4b60b5dae 100644 (file)
@@ -91,6 +91,7 @@ int pdc_sti_call(unsigned long func, unsigned long flags,
                  unsigned long inptr, unsigned long outputr,
                  unsigned long glob_cfg);
 
+int __pdc_cpu_rendezvous(void);
 static inline char * os_id_to_string(u16 os_id) {
        switch(os_id) {
        case OS_ID_NONE:        return "No OS";
index 58cc08e7fd122acace311f2364e00a6660a61f52..1d976f2ebff0fe6b9026b4ed81fe878449cf0e95 100644 (file)
@@ -311,6 +311,19 @@ int pdc_chassis_disp(unsigned long disp)
        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
  * @retval: -1 on error, 0 on success
index cbd074ba22dad3b9b84e5dbbf56d463121b7ff2a..e202c37e56af3d86db550f742bdd80622db46dbb 100644 (file)
@@ -109,6 +109,7 @@ halt_processor(void)
        /* REVISIT : does PM *know* this CPU isn't available? */
        set_cpu_online(smp_processor_id(), false);
        local_irq_disable();
+       __pdc_cpu_rendezvous();
        for (;;)
                ;
 }