parisc: Switch to hotplug core state synchronization
authorThomas Gleixner <tglx@linutronix.de>
Fri, 12 May 2023 21:07:38 +0000 (23:07 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 15 May 2023 11:44:59 +0000 (13:44 +0200)
Switch to the CPU hotplug core state tracking and synchronization
mechanim. No functional change intended.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Michael Kelley <mikelley@microsoft.com>
Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Tested-by: Helge Deller <deller@gmx.de> # parisc
Tested-by: Guilherme G. Piccoli <gpiccoli@igalia.com> # Steam Deck
Link: https://lore.kernel.org/r/20230512205256.859920443@linutronix.de
arch/parisc/Kconfig
arch/parisc/kernel/process.c
arch/parisc/kernel/smp.c

index 466a25525364d2d45e7ed5bf286856242fdc90d2..67a3f98a2c5edcadeb6bd622036e6e8bc6e7bbb0 100644 (file)
@@ -57,6 +57,7 @@ config PARISC
        select HAVE_ARCH_SECCOMP_FILTER
        select HAVE_ARCH_TRACEHOOK
        select HAVE_REGS_AND_STACK_ACCESS_API
+       select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU
        select GENERIC_SCHED_CLOCK
        select GENERIC_IRQ_MIGRATION if SMP
        select HAVE_UNSTABLE_SCHED_CLOCK if SMP
index 97c6f875bd0e12f188215afa07815356711593f5..66f6543417b780390d4ac144f737ab4588749f67 100644 (file)
@@ -166,8 +166,8 @@ void __noreturn arch_cpu_idle_dead(void)
 
        local_irq_disable();
 
-       /* Tell __cpu_die() that this CPU is now safe to dispose of. */
-       (void)cpu_report_death();
+       /* Tell the core that this CPU is now safe to dispose of. */
+       cpuhp_ap_report_dead();
 
        /* Ensure that the cache lines are written out. */
        flush_cache_all_local();
index b7fc859fa87dbae3270b4dd692e28357d8879595..6b6eaa485946279873c17e00d7c63c102727d8a0 100644 (file)
@@ -500,11 +500,10 @@ int __cpu_disable(void)
 void __cpu_die(unsigned int cpu)
 {
        pdc_cpu_rendezvous_lock();
+}
 
-       if (!cpu_wait_death(cpu, 5)) {
-               pr_crit("CPU%u: cpu didn't die\n", cpu);
-               return;
-       }
+void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu)
+{
        pr_info("CPU%u: is shutting down\n", cpu);
 
        /* set task's state to interruptible sleep */