Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

csky/smp: Switch to hotplug core state synchronization

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

authored by

Thomas Gleixner and committed by
Peter Zijlstra
7202e979 b3091f17

+4 -7
+1
arch/csky/Kconfig
··· 96 96 select HAVE_REGS_AND_STACK_ACCESS_API 97 97 select HAVE_STACKPROTECTOR 98 98 select HAVE_SYSCALL_TRACEPOINTS 99 + select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU 99 100 select MAY_HAVE_SPARSE_IRQ 100 101 select MODULES_USE_ELF_RELA if MODULES 101 102 select OF
+1 -1
arch/csky/include/asm/smp.h
··· 23 23 24 24 int __cpu_disable(void); 25 25 26 - void __cpu_die(unsigned int cpu); 26 + static inline void __cpu_die(unsigned int cpu) { } 27 27 28 28 #endif /* CONFIG_SMP */ 29 29
+2 -6
arch/csky/kernel/smp.c
··· 291 291 return 0; 292 292 } 293 293 294 - void __cpu_die(unsigned int cpu) 294 + void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu) 295 295 { 296 - if (!cpu_wait_death(cpu, 5)) { 297 - pr_crit("CPU%u: shutdown failed\n", cpu); 298 - return; 299 - } 300 296 pr_notice("CPU%u: shutdown\n", cpu); 301 297 } 302 298 ··· 300 304 { 301 305 idle_task_exit(); 302 306 303 - cpu_report_death(); 307 + cpuhp_ap_report_dead(); 304 308 305 309 while (!secondary_stack) 306 310 arch_cpu_idle();