Skip to content

Commit 371fb85

Browse files
committed
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
2 parents e563592 + 1307083 commit 371fb85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/cpu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ static int takedown_cpu(unsigned int cpu)
961961
int err;
962962

963963
/* Park the smpboot threads */
964-
kthread_park(per_cpu_ptr(&cpuhp_state, cpu)->thread);
964+
kthread_park(st->thread);
965965

966966
/*
967967
* Prevent irq alloc/free while the dying cpu reorganizes the
@@ -977,7 +977,7 @@ static int takedown_cpu(unsigned int cpu)
977977
/* CPU refused to die */
978978
irq_unlock_sparse();
979979
/* Unpark the hotplug thread so we can rollback there */
980-
kthread_unpark(per_cpu_ptr(&cpuhp_state, cpu)->thread);
980+
kthread_unpark(st->thread);
981981
return err;
982982
}
983983
BUG_ON(cpu_online(cpu));

0 commit comments

Comments
 (0)