diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-07-15 14:55:30 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-07-15 14:55:30 -0700 |
commit | 0eff0491e74c4df69bbe43555243ecec85577823 (patch) | |
tree | decb4b2c6d629a80f163c683c2409738f6e49fef /kernel/cpu.c | |
parent | 0e4b77d4eaa121bdcf8cb2b07aa4a16e7a9e7c6d (diff) | |
parent | 77aeb1b685f9db73d276bad4bb30d48505a6fd23 (diff) |
Merge tag 'smp-core-2024-07-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull CPU hotplug updates from Thomas Gleixner:
"A small set of SMP/CPU hotplug updates:
- Reverse the order of iteration when freezing secondary CPUs for
hibernation.
This avoids that drivers like the Intel uncore performance counter
have to transfer the assignement of handling the per package uncore
events for every CPU in a package, which is a considerable speedup
on larger systems.
- Add a missing destroy_work_on_stack() invocation in
smp_call_on_cpu() to prevent debug objects to emit a false positive
warning when the stack is freed.
- Small cleanups in comments and a str_plural() conversion"
* tag 'smp-core-2024-07-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
smp: Add missing destroy_work_on_stack() call in smp_call_on_cpu()
cpu/hotplug: Reverse order of iteration in freeze_secondary_cpus()
smp: Use str_plural() to fix Coccinelle warnings
cpu/hotplug: Fix typo in comment
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r-- | kernel/cpu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index 3d2bf1d50a0c..7121f058674a 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -1894,8 +1894,8 @@ int freeze_secondary_cpus(int primary) cpumask_clear(frozen_cpus); pr_info("Disabling non-boot CPUs ...\n"); - for_each_online_cpu(cpu) { - if (cpu == primary) + for (cpu = nr_cpu_ids - 1; cpu >= 0; cpu--) { + if (!cpu_online(cpu) || cpu == primary) continue; if (pm_wakeup_pending()) { |