aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2007-08-16 03:34:22 -0400
committerLen Brown <len.brown@intel.com>2007-08-21 00:33:35 -0400
commit61ec7567db103d537329b0db9a887db570431ff4 (patch)
tree7287eb4bd00c09434fc2dd0babadfd0eb7ddc832 /init
parent28e8351ac22de25034e048c680014ad824323c65 (diff)
ACPI: boot correctly with "nosmp" or "maxcpus=0"
In MPS mode, "nosmp" and "maxcpus=0" boot a UP kernel with IOAPIC disabled. However, in ACPI mode, these parameters didn't completely disable the IO APIC initialization code and boot failed. init/main.c: Disable the IO_APIC if "nosmp" or "maxcpus=0" undefine disable_ioapic_setup() when it doesn't apply. i386: delete ioapic_setup(), it was a duplicate of parse_noapic() delete undefinition of disable_ioapic_setup() x86_64: rename disable_ioapic_setup() to parse_noapic() to match i386 define disable_ioapic_setup() in header to match i386 http://bugzilla.kernel.org/show_bug.cgi?id=1641 Acked-by: Andi Kleen <ak@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'init')
-rw-r--r--init/main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/init/main.c b/init/main.c
index d3bcb3b11620..cc0653ec081d 100644
--- a/init/main.c
+++ b/init/main.c
@@ -146,9 +146,14 @@ static unsigned int __initdata max_cpus = NR_CPUS;
146 * greater than 0, limits the maximum number of CPUs activated in 146 * greater than 0, limits the maximum number of CPUs activated in
147 * SMP mode to <NUM>. 147 * SMP mode to <NUM>.
148 */ 148 */
149#ifndef CONFIG_X86_IO_APIC
150static inline void disable_ioapic_setup(void) {};
151#endif
152
149static int __init nosmp(char *str) 153static int __init nosmp(char *str)
150{ 154{
151 max_cpus = 0; 155 max_cpus = 0;
156 disable_ioapic_setup();
152 return 0; 157 return 0;
153} 158}
154 159
@@ -157,10 +162,13 @@ early_param("nosmp", nosmp);
157static int __init maxcpus(char *str) 162static int __init maxcpus(char *str)
158{ 163{
159 get_option(&str, &max_cpus); 164 get_option(&str, &max_cpus);
160 return 1; 165 if (max_cpus == 0)
166 disable_ioapic_setup();
167
168 return 0;
161} 169}
162 170
163__setup("maxcpus=", maxcpus); 171early_param("maxcpus=", maxcpus);
164#else 172#else
165#define max_cpus NR_CPUS 173#define max_cpus NR_CPUS
166#endif 174#endif