]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
csky/smp: Switch to hotplug core state synchronization
authorThomas Gleixner <tglx@linutronix.de>
Fri, 12 May 2023 21:07:35 +0000 (23:07 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 15 May 2023 11:44:58 +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.747254502@linutronix.de
arch/csky/Kconfig
arch/csky/include/asm/smp.h
arch/csky/kernel/smp.c

index 4df1f8c9d170b3359d3759d1ce1640bf76a422af..95f1e9bfd1c7d3687309f080bf7df755bb998aaa 100644 (file)
@@ -96,6 +96,7 @@ config CSKY
        select HAVE_REGS_AND_STACK_ACCESS_API
        select HAVE_STACKPROTECTOR
        select HAVE_SYSCALL_TRACEPOINTS
+       select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU
        select MAY_HAVE_SPARSE_IRQ
        select MODULES_USE_ELF_RELA if MODULES
        select OF
index 668b79ce29ea111d700f66d4ccf348acd85a3f7b..d3db334f319648d9ed500cf56b4f60181ce3597c 100644 (file)
@@ -23,7 +23,7 @@ void __init set_send_ipi(void (*func)(const struct cpumask *mask), int irq);
 
 int __cpu_disable(void);
 
-void __cpu_die(unsigned int cpu);
+static inline void __cpu_die(unsigned int cpu) { }
 
 #endif /* CONFIG_SMP */
 
index b12e2c3c387f89582edc9a3e08155ec4f86a159f..8e42352cbf123f4bc771dfefda013bf12d818cfa 100644 (file)
@@ -291,12 +291,8 @@ int __cpu_disable(void)
        return 0;
 }
 
-void __cpu_die(unsigned int cpu)
+void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu)
 {
-       if (!cpu_wait_death(cpu, 5)) {
-               pr_crit("CPU%u: shutdown failed\n", cpu);
-               return;
-       }
        pr_notice("CPU%u: shutdown\n", cpu);
 }
 
@@ -304,7 +300,7 @@ void __noreturn arch_cpu_idle_dead(void)
 {
        idle_task_exit();
 
-       cpu_report_death();
+       cpuhp_ap_report_dead();
 
        while (!secondary_stack)
                arch_cpu_idle();