arm64: 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: Mark Rutland <mark.rutland@arm.com> 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.690926018@linutronix.de
This commit is contained in:
parent
5490e769cd
commit
b3091f172f
3 changed files with 7 additions and 10 deletions
|
@ -222,6 +222,7 @@ config ARM64
|
||||||
select HAVE_KPROBES
|
select HAVE_KPROBES
|
||||||
select HAVE_KRETPROBES
|
select HAVE_KRETPROBES
|
||||||
select HAVE_GENERIC_VDSO
|
select HAVE_GENERIC_VDSO
|
||||||
|
select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU
|
||||||
select IRQ_DOMAIN
|
select IRQ_DOMAIN
|
||||||
select IRQ_FORCED_THREADING
|
select IRQ_FORCED_THREADING
|
||||||
select KASAN_VMALLOC if KASAN
|
select KASAN_VMALLOC if KASAN
|
||||||
|
|
|
@ -99,7 +99,7 @@ static inline void arch_send_wakeup_ipi_mask(const struct cpumask *mask)
|
||||||
|
|
||||||
extern int __cpu_disable(void);
|
extern int __cpu_disable(void);
|
||||||
|
|
||||||
extern void __cpu_die(unsigned int cpu);
|
static inline void __cpu_die(unsigned int cpu) { }
|
||||||
extern void __noreturn cpu_die(void);
|
extern void __noreturn cpu_die(void);
|
||||||
extern void __noreturn cpu_die_early(void);
|
extern void __noreturn cpu_die_early(void);
|
||||||
|
|
||||||
|
|
|
@ -332,17 +332,13 @@ static int op_cpu_kill(unsigned int cpu)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* called on the thread which is asking for a CPU to be shutdown -
|
* Called on the thread which is asking for a CPU to be shutdown after the
|
||||||
* waits until shutdown has completed, or it is timed out.
|
* shutdown completed.
|
||||||
*/
|
*/
|
||||||
void __cpu_die(unsigned int cpu)
|
void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
if (!cpu_wait_death(cpu, 5)) {
|
|
||||||
pr_crit("CPU%u: cpu didn't die\n", cpu);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
pr_debug("CPU%u: shutdown\n", cpu);
|
pr_debug("CPU%u: shutdown\n", cpu);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -369,8 +365,8 @@ void __noreturn cpu_die(void)
|
||||||
|
|
||||||
local_daif_mask();
|
local_daif_mask();
|
||||||
|
|
||||||
/* Tell __cpu_die() that this CPU is now safe to dispose of */
|
/* Tell cpuhp_bp_sync_dead() that this CPU is now safe to dispose of */
|
||||||
(void)cpu_report_death();
|
cpuhp_ap_report_dead();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actually shutdown the CPU. This must never fail. The specific hotplug
|
* Actually shutdown the CPU. This must never fail. The specific hotplug
|
||||||
|
|
Loading…
Add table
Reference in a new issue