mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86: Issue a warning if number of present CPUs > maxcpus and CONFIG_HOTPLUG=n
@ 2014-02-15 14:02 Petr Tesarik
  2014-02-16 17:11 ` Borislav Petkov
  2014-02-17  8:34 ` Jan Beulich
  0 siblings, 2 replies; 9+ messages in thread
From: Petr Tesarik @ 2014-02-15 14:02 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	Borislav Petkov, Jan Beulich, linux-kernel

Note that the check against i (value passed as maxcpus, but at least 1)
is repeated further down, including the warning, but since possible is
already clamped to max_cpus at that time, it is never printed. In fact,
for the non-hotplug case, the warning about exceeding maxcpus is only
ever printed if "possible_cpus" was also specified on the command line.

I strongly believe that such limitation was unintentional.

I also changed the message slightly -- the kernel parameter name is
maxcpus, not max_cpus.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
---
 arch/x86/kernel/smpboot.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index a32da80..376b6c6 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1226,9 +1226,6 @@ __init void prefill_possible_map(void)
 #ifdef CONFIG_HOTPLUG_CPU
 		if (setup_max_cpus)
 			possible += disabled_cpus;
-#else
-		if (possible > i)
-			possible = i;
 #endif
 	} else
 		possible = setup_possible_cpus;
@@ -1246,7 +1243,7 @@ __init void prefill_possible_map(void)
 	if (!setup_max_cpus)
 #endif
 	if (possible > i) {
-		pr_warn("%d Processors exceeds max_cpus limit of %u\n",
+		pr_warn("%d Processors exceeds maxcpus limit of %u\n",
 			possible, setup_max_cpus);
 		possible = i;
 	}
-- 
1.8.4.5

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-02-17 22:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-15 14:02 [PATCH] x86: Issue a warning if number of present CPUs > maxcpus and CONFIG_HOTPLUG=n Petr Tesarik
2014-02-16 17:11 ` Borislav Petkov
2014-02-17  8:34 ` Jan Beulich
2014-02-17 10:04   ` Petr Tesarik
2014-02-17 13:40     ` Henrique de Moraes Holschuh
2014-02-17 14:16       ` Petr Tesarik
2014-02-17 19:07         ` Henrique de Moraes Holschuh
2014-02-17 19:31           ` Petr Tesarik
2014-02-17 22:51             ` Henrique de Moraes Holschuh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®