Skip to content

Commit 3c2f885

Browse files
author
Ingo Molnar
committed
smp: Provide 'setup_max_cpus' definition on UP too
This was already defined locally by init/main.c, but let's make it generic, as arch/x86/kernel/cpu/topology.c is going to make use of it to have more uniform code. Reviewed-by: Thomas Gleixner <[email protected]> Cc: [email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 4c8a498 commit 3c2f885

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

include/linux/smp.h

+2
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ smp_call_function_any(const struct cpumask *mask, smp_call_func_t func,
218218
static inline void kick_all_cpus_sync(void) { }
219219
static inline void wake_up_all_idle_cpus(void) { }
220220

221+
#define setup_max_cpus 0
222+
221223
#ifdef CONFIG_UP_LATE_INIT
222224
extern void __init up_late_init(void);
223225
static inline void smp_init(void) { up_late_init(); }

init/main.c

-1
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,6 @@ static int __init rdinit_setup(char *str)
603603
__setup("rdinit=", rdinit_setup);
604604

605605
#ifndef CONFIG_SMP
606-
static const unsigned int setup_max_cpus = NR_CPUS;
607606
static inline void setup_nr_cpu_ids(void) { }
608607
static inline void smp_prepare_cpus(unsigned int maxcpus) { }
609608
#endif

0 commit comments

Comments
 (0)