diff options
author | Helge Deller <deller@gmx.de> | 2022-03-27 15:03:53 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2022-03-29 21:37:13 +0200 |
commit | 1afde47d082c92c4fd3d9b322d944f8d87469834 (patch) | |
tree | 8e7cd0280a22b7dfdc7e1af3691106e9172109f9 /arch/parisc/kernel/smp.c | |
parent | parisc: Move common_stext into .text section when CONFIG_HOTPLUG_CPU=y (diff) | |
download | linux-dev-1afde47d082c92c4fd3d9b322d944f8d87469834.tar.xz linux-dev-1afde47d082c92c4fd3d9b322d944f8d87469834.zip |
parisc: Find a new timesync master if current CPU is removed
When CPU hotplugging is enabled, the user may want to remove the
current CPU which is providing the timer ticks. If this happens
we need to find a new timesync master.
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/kernel/smp.c')
-rw-r--r-- | arch/parisc/kernel/smp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 8c5ea457b6e1..24d0744c3b3a 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c @@ -465,6 +465,12 @@ int __cpu_disable(void) */ set_cpu_online(cpu, false); + /* Find a new timesync master */ + if (cpu == time_keeper_id) { + time_keeper_id = cpumask_first(cpu_online_mask); + pr_info("CPU %d is now promoted to time-keeper master\n", time_keeper_id); + } + disable_percpu_irq(IPI_IRQ); irq_migrate_all_off_this_cpu(); |