diff options
author | Ingo Molnar <mingo@kernel.org> | 2024-02-26 14:07:31 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-16 14:47:49 +0300 |
commit | 8353b7f70dd22461e3adb9a0edf8f2f09ccd9aa6 (patch) | |
tree | e8e6c25a2fad6ab13daca70fa5e49f31ae3361ac | |
parent | 50f3931746b5fab057ff91c0c9ffa3900e6eaa43 (diff) | |
download | linux-8353b7f70dd22461e3adb9a0edf8f2f09ccd9aa6.tar.xz |
smp: Provide 'setup_max_cpus' definition on UP too
commit 3c2f8859ae1ce53f2a89c8e4ca4092101afbff67 upstream.
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 <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | include/linux/smp.h | 2 | ||||
-rw-r--r-- | init/main.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/smp.h b/include/linux/smp.h index 91ea4a67f8ca..2e3f605c346b 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -218,6 +218,8 @@ smp_call_function_any(const struct cpumask *mask, smp_call_func_t func, static inline void kick_all_cpus_sync(void) { } static inline void wake_up_all_idle_cpus(void) { } +#define setup_max_cpus 0 + #ifdef CONFIG_UP_LATE_INIT extern void __init up_late_init(void); static inline void smp_init(void) { up_late_init(); } diff --git a/init/main.c b/init/main.c index b25c779e93ac..c787e94cc898 100644 --- a/init/main.c +++ b/init/main.c @@ -604,7 +604,6 @@ static int __init rdinit_setup(char *str) __setup("rdinit=", rdinit_setup); #ifndef CONFIG_SMP -static const unsigned int setup_max_cpus = NR_CPUS; static inline void setup_nr_cpu_ids(void) { } static inline void smp_prepare_cpus(unsigned int maxcpus) { } #endif |