aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpu.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-06-29 12:21:21 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-06-29 12:21:21 -0700
commit371fb85457c857eeac1611d3661ee8e637f6548c (patch)
tree6ee2278d4746ed03a4b70b690308074fd2dc7fb3 /kernel/cpu.c
parentMerge tag 'printk-for-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux (diff)
parentcpu/hotplug: Simplify access to percpu cpuhp_state (diff)
downloadlinux-dev-371fb85457c857eeac1611d3661ee8e637f6548c.tar.xz
linux-dev-371fb85457c857eeac1611d3661ee8e637f6548c.zip
Merge tag 'smp-core-2021-06-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull CPU hotplug cleanup from Thomas Gleixner: "A simple cleanup for the CPU hotplug code to avoid per_cpu_ptr() reevaluation" * tag 'smp-core-2021-06-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/hotplug: Simplify access to percpu cpuhp_state
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r--kernel/cpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index e538518556f4..2942cb4644c5 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -961,7 +961,7 @@ static int takedown_cpu(unsigned int cpu)
int err;
/* Park the smpboot threads */
- kthread_park(per_cpu_ptr(&cpuhp_state, cpu)->thread);
+ kthread_park(st->thread);
/*
* Prevent irq alloc/free while the dying cpu reorganizes the
@@ -977,7 +977,7 @@ static int takedown_cpu(unsigned int cpu)
/* CPU refused to die */
irq_unlock_sparse();
/* Unpark the hotplug thread so we can rollback there */
- kthread_unpark(per_cpu_ptr(&cpuhp_state, cpu)->thread);
+ kthread_unpark(st->thread);
return err;
}
BUG_ON(cpu_online(cpu));