diff options
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r-- | kernel/cpu.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index cb7a1efa9c2b..156cc5556140 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
@@ -384,6 +384,14 @@ out: | |||
384 | #ifdef CONFIG_PM_SLEEP_SMP | 384 | #ifdef CONFIG_PM_SLEEP_SMP |
385 | static cpumask_var_t frozen_cpus; | 385 | static cpumask_var_t frozen_cpus; |
386 | 386 | ||
387 | void __weak arch_disable_nonboot_cpus_begin(void) | ||
388 | { | ||
389 | } | ||
390 | |||
391 | void __weak arch_disable_nonboot_cpus_end(void) | ||
392 | { | ||
393 | } | ||
394 | |||
387 | int disable_nonboot_cpus(void) | 395 | int disable_nonboot_cpus(void) |
388 | { | 396 | { |
389 | int cpu, first_cpu, error = 0; | 397 | int cpu, first_cpu, error = 0; |
@@ -395,6 +403,7 @@ int disable_nonboot_cpus(void) | |||
395 | * with the userspace trying to use the CPU hotplug at the same time | 403 | * with the userspace trying to use the CPU hotplug at the same time |
396 | */ | 404 | */ |
397 | cpumask_clear(frozen_cpus); | 405 | cpumask_clear(frozen_cpus); |
406 | arch_disable_nonboot_cpus_begin(); | ||
398 | 407 | ||
399 | printk("Disabling non-boot CPUs ...\n"); | 408 | printk("Disabling non-boot CPUs ...\n"); |
400 | for_each_online_cpu(cpu) { | 409 | for_each_online_cpu(cpu) { |
@@ -410,6 +419,8 @@ int disable_nonboot_cpus(void) | |||
410 | } | 419 | } |
411 | } | 420 | } |
412 | 421 | ||
422 | arch_disable_nonboot_cpus_end(); | ||
423 | |||
413 | if (!error) { | 424 | if (!error) { |
414 | BUG_ON(num_online_cpus() > 1); | 425 | BUG_ON(num_online_cpus() > 1); |
415 | /* Make sure the CPUs won't be enabled by someone else */ | 426 | /* Make sure the CPUs won't be enabled by someone else */ |