aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/mpparse_64.c7
-rw-r--r--arch/x86/kernel/smpboot.c12
-rw-r--r--arch/x86/kernel/smpboot_32.c13
3 files changed, 19 insertions, 13 deletions
diff --git a/arch/x86/kernel/mpparse_64.c b/arch/x86/kernel/mpparse_64.c
index 72ab1403fed7..2a1f7881c75b 100644
--- a/arch/x86/kernel/mpparse_64.c
+++ b/arch/x86/kernel/mpparse_64.c
@@ -32,6 +32,7 @@
32 32
33/* Have we found an MP table */ 33/* Have we found an MP table */
34int smp_found_config; 34int smp_found_config;
35unsigned int __cpuinitdata maxcpus = NR_CPUS;
35 36
36/* 37/*
37 * Various Linux-internal data structures created from the 38 * Various Linux-internal data structures created from the
@@ -115,6 +116,12 @@ static void __cpuinit MP_processor_info(struct mpc_config_processor *m)
115 return; 116 return;
116 } 117 }
117 118
119 if (num_processors >= maxcpus) {
120 printk(KERN_WARNING "WARNING: maxcpus limit of %i reached."
121 " Processor ignored.\n", maxcpus);
122 return;
123 }
124
118 num_processors++; 125 num_processors++;
119 cpus_complement(tmp_map, cpu_present_map); 126 cpus_complement(tmp_map, cpu_present_map);
120 cpu = first_cpu(tmp_map); 127 cpu = first_cpu(tmp_map);
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index c35cd319d1ed..34c31178041b 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -268,3 +268,15 @@ void __cpu_die(unsigned int cpu)
268} 268}
269#endif 269#endif
270 270
271/*
272 * If the BIOS enumerates physical processors before logical,
273 * maxcpus=N at enumeration-time can be used to disable HT.
274 */
275static int __init parse_maxcpus(char *arg)
276{
277 extern unsigned int maxcpus;
278
279 maxcpus = simple_strtoul(arg, NULL, 0);
280 return 0;
281}
282early_param("maxcpus", parse_maxcpus);
diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c
index 00b1b59cd560..3236e843a9ad 100644
--- a/arch/x86/kernel/smpboot_32.c
+++ b/arch/x86/kernel/smpboot_32.c
@@ -1113,16 +1113,3 @@ void __init smp_intr_init(void)
1113 /* IPI for generic function call */ 1113 /* IPI for generic function call */
1114 set_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt); 1114 set_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt);
1115} 1115}
1116
1117/*
1118 * If the BIOS enumerates physical processors before logical,
1119 * maxcpus=N at enumeration-time can be used to disable HT.
1120 */
1121static int __init parse_maxcpus(char *arg)
1122{
1123 extern unsigned int maxcpus;
1124
1125 maxcpus = simple_strtoul(arg, NULL, 0);
1126 return 0;
1127}
1128early_param("maxcpus", parse_maxcpus);