From 184a97febfdb5305e4994b2792e967cf8688f26e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 15 Jun 2024 13:08:56 +0200 Subject: [PATCH] 6.6-stable patches added patches: smp-provide-setup_max_cpus-definition-on-up-too.patch --- queue-6.6/series | 1 + ...-setup_max_cpus-definition-on-up-too.patch | 44 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 queue-6.6/smp-provide-setup_max_cpus-definition-on-up-too.patch diff --git a/queue-6.6/series b/queue-6.6/series index 927a8b2a421..9c53fd17214 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -134,3 +134,4 @@ powerpc-64-bpf-fix-tail-calls-for-pcrel-addressing.patch powerpc-bpf-enforce-full-ordering-for-atomic-operations-with-bpf_fetch.patch smb-client-fix-deadlock-in-smb2_find_smb_tcon.patch selftests-net-more-strict-check-in-net_helper.patch +smp-provide-setup_max_cpus-definition-on-up-too.patch diff --git a/queue-6.6/smp-provide-setup_max_cpus-definition-on-up-too.patch b/queue-6.6/smp-provide-setup_max_cpus-definition-on-up-too.patch new file mode 100644 index 00000000000..ae8504c7b69 --- /dev/null +++ b/queue-6.6/smp-provide-setup_max_cpus-definition-on-up-too.patch @@ -0,0 +1,44 @@ +From 3c2f8859ae1ce53f2a89c8e4ca4092101afbff67 Mon Sep 17 00:00:00 2001 +From: Ingo Molnar +Date: Mon, 26 Feb 2024 12:07:31 +0100 +Subject: smp: Provide 'setup_max_cpus' definition on UP too + +From: Ingo Molnar + +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 +Cc: linux-kernel@vger.kernel.org +Signed-off-by: Ingo Molnar +Cc: Guenter Roeck +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -218,6 +218,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 +@@ -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 -- 2.47.3