smp: Avoid 'setup_max_cpus' namespace collision/shadowing
bringup_nonboot_cpus() gets passed the 'setup_max_cpus' variable in init/main.c - which is also the name of the parameter, shadowing the name. To reduce confusion and to allow the 'setup_max_cpus' value to be #defined in the <linux/smp.h> header, use the 'max_cpus' name for the function parameter name. Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.orgpull/816/head
parent
89b0f15f40
commit
4c8a498541
|
|
@ -112,7 +112,7 @@ void notify_cpu_starting(unsigned int cpu);
|
||||||
extern void cpu_maps_update_begin(void);
|
extern void cpu_maps_update_begin(void);
|
||||||
extern void cpu_maps_update_done(void);
|
extern void cpu_maps_update_done(void);
|
||||||
int bringup_hibernate_cpu(unsigned int sleep_cpu);
|
int bringup_hibernate_cpu(unsigned int sleep_cpu);
|
||||||
void bringup_nonboot_cpus(unsigned int setup_max_cpus);
|
void bringup_nonboot_cpus(unsigned int max_cpus);
|
||||||
|
|
||||||
#else /* CONFIG_SMP */
|
#else /* CONFIG_SMP */
|
||||||
#define cpuhp_tasks_frozen 0
|
#define cpuhp_tasks_frozen 0
|
||||||
|
|
|
||||||
|
|
@ -1909,14 +1909,14 @@ static bool __init cpuhp_bringup_cpus_parallel(unsigned int ncpus)
|
||||||
static inline bool cpuhp_bringup_cpus_parallel(unsigned int ncpus) { return false; }
|
static inline bool cpuhp_bringup_cpus_parallel(unsigned int ncpus) { return false; }
|
||||||
#endif /* CONFIG_HOTPLUG_PARALLEL */
|
#endif /* CONFIG_HOTPLUG_PARALLEL */
|
||||||
|
|
||||||
void __init bringup_nonboot_cpus(unsigned int setup_max_cpus)
|
void __init bringup_nonboot_cpus(unsigned int max_cpus)
|
||||||
{
|
{
|
||||||
/* Try parallel bringup optimization if enabled */
|
/* Try parallel bringup optimization if enabled */
|
||||||
if (cpuhp_bringup_cpus_parallel(setup_max_cpus))
|
if (cpuhp_bringup_cpus_parallel(max_cpus))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Full per CPU serialized bringup */
|
/* Full per CPU serialized bringup */
|
||||||
cpuhp_bringup_mask(cpu_present_mask, setup_max_cpus, CPUHP_ONLINE);
|
cpuhp_bringup_mask(cpu_present_mask, max_cpus, CPUHP_ONLINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM_SLEEP_SMP
|
#ifdef CONFIG_PM_SLEEP_SMP
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue