smp: Provide 'setup_max_cpus' definition on UP too

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ingo Molnar <mingo@xxxxxxxxxx>

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@xxxxxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Guenter Roeck <linux@xxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 include/linux/smp.h |    2 ++
 init/main.c         |    1 -
 2 files changed, 2 insertions(+), 1 deletion(-)

--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -211,6 +211,8 @@ smp_call_function_any(const struct cpuma
 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(); }
--- a/init/main.c
+++ b/init/main.c
@@ -607,7 +607,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


Patches currently in stable-queue which might be from mingo@xxxxxxxxxx are

queue-6.1/smp-provide-setup_max_cpus-definition-on-up-too.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux