Skip to content
Snippets Groups Projects
Commit 8bc72b81 authored by Ingo Molnar's avatar Ingo Molnar Committed by Frieder Schrempf
Browse files

smp: Provide 'setup_max_cpus' definition on UP too


commit 3c2f8859 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: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 00f2991e
No related branches found
No related tags found
1 merge request!157🤖 Sync Bot: Update v6.1-ktn to Latest Stable Kernel (v6.1.97)
...@@ -211,6 +211,8 @@ smp_call_function_any(const struct cpumask *mask, smp_call_func_t func, ...@@ -211,6 +211,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 kick_all_cpus_sync(void) { }
static inline void wake_up_all_idle_cpus(void) { } static inline void wake_up_all_idle_cpus(void) { }
#define setup_max_cpus 0
#ifdef CONFIG_UP_LATE_INIT #ifdef CONFIG_UP_LATE_INIT
extern void __init up_late_init(void); extern void __init up_late_init(void);
static inline void smp_init(void) { up_late_init(); } static inline void smp_init(void) { up_late_init(); }
......
...@@ -607,7 +607,6 @@ static int __init rdinit_setup(char *str) ...@@ -607,7 +607,6 @@ static int __init rdinit_setup(char *str)
__setup("rdinit=", rdinit_setup); __setup("rdinit=", rdinit_setup);
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
static const unsigned int setup_max_cpus = NR_CPUS;
static inline void setup_nr_cpu_ids(void) { } static inline void setup_nr_cpu_ids(void) { }
static inline void smp_prepare_cpus(unsigned int maxcpus) { } static inline void smp_prepare_cpus(unsigned int maxcpus) { }
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment