mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-04 21:31:51 +00:00
cpu/hotplug: Move bringup of secondary CPUs out of smp_init()
This is the last direct user of cpu_up() before it can become an internal implementation detail of the cpu subsystem. Signed-off-by: Qais Yousef <qais.yousef@arm.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20200323135110.30522-17-qais.yousef@arm.com
This commit is contained in:
parent
457bc8ed3e
commit
b99a26593b
3 changed files with 14 additions and 8 deletions
12
kernel/cpu.c
12
kernel/cpu.c
|
@ -1298,6 +1298,18 @@ int bringup_hibernate_cpu(unsigned int sleep_cpu)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void bringup_nonboot_cpus(unsigned int setup_max_cpus)
|
||||
{
|
||||
unsigned int cpu;
|
||||
|
||||
for_each_present_cpu(cpu) {
|
||||
if (num_online_cpus() >= setup_max_cpus)
|
||||
break;
|
||||
if (!cpu_online(cpu))
|
||||
cpu_up(cpu);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP_SMP
|
||||
static cpumask_var_t frozen_cpus;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue