diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-06-20 19:11:20 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 06:48:31 -0400 |
commit | 3c999f142665265afd0fe9190204dd051f17e505 (patch) | |
tree | 83b764c2a90890c22b199d6445cf2e132babe455 /arch | |
parent | 88a6846c70ad6bf33a545d554ace801d69e8a1a5 (diff) |
x86: check command line when CONFIG_X86_MPPARSE is not set, v2
if acpi=off, acpi=noirq and pci=noacpi, we need to disable apic.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 14 | ||||
-rw-r--r-- | arch/x86/kernel/apic_32.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/setup_32.c | 5 | ||||
-rw-r--r-- | arch/x86/kernel/setup_64.c | 9 |
5 files changed, 33 insertions, 1 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 6516359922b..5c0107602b6 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -1787,6 +1787,20 @@ static int __init parse_pci(char *arg) | |||
1787 | } | 1787 | } |
1788 | early_param("pci", parse_pci); | 1788 | early_param("pci", parse_pci); |
1789 | 1789 | ||
1790 | int __init acpi_mps_check(void) | ||
1791 | { | ||
1792 | #if defined(CONFIG_X86_LOCAL_APIC) && !defined(CONFIG_X86_MPPARSE) | ||
1793 | /* mptable code is not built-in*/ | ||
1794 | if (acpi_disabled || acpi_noirq) { | ||
1795 | printk(KERN_WARNING "MPS support code is not built-in.\n" | ||
1796 | "Using acpi=off or acpi=noirq or pci=noacpi " | ||
1797 | "may have problem\n"); | ||
1798 | return 1; | ||
1799 | } | ||
1800 | #endif | ||
1801 | return 0; | ||
1802 | } | ||
1803 | |||
1790 | #ifdef CONFIG_X86_IO_APIC | 1804 | #ifdef CONFIG_X86_IO_APIC |
1791 | static int __init parse_acpi_skip_timer_override(char *arg) | 1805 | static int __init parse_acpi_skip_timer_override(char *arg) |
1792 | { | 1806 | { |
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c index dd8de26b278..4932d7813bc 100644 --- a/arch/x86/kernel/apic_32.c +++ b/arch/x86/kernel/apic_32.c | |||
@@ -57,7 +57,7 @@ unsigned long mp_lapic_addr; | |||
57 | * | 57 | * |
58 | * -1=force-disable, +1=force-enable | 58 | * -1=force-disable, +1=force-enable |
59 | */ | 59 | */ |
60 | static int enable_local_apic __initdata; | 60 | int enable_local_apic; |
61 | 61 | ||
62 | /* Local APIC timer verification ok */ | 62 | /* Local APIC timer verification ok */ |
63 | static int local_apic_timer_verify_ok; | 63 | static int local_apic_timer_verify_ok; |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index c5330f601b6..56aee55cf8d 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -161,6 +161,10 @@ void __init setup_per_cpu_areas(void) | |||
161 | char *ptr; | 161 | char *ptr; |
162 | int cpu; | 162 | int cpu; |
163 | 163 | ||
164 | /* no processor from mptable or madt */ | ||
165 | if (!num_processors) | ||
166 | num_processors = 1; | ||
167 | |||
164 | #ifdef CONFIG_HOTPLUG_CPU | 168 | #ifdef CONFIG_HOTPLUG_CPU |
165 | prefill_possible_map(); | 169 | prefill_possible_map(); |
166 | #else | 170 | #else |
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c index 369d0fe1ff9..cad4e893df0 100644 --- a/arch/x86/kernel/setup_32.c +++ b/arch/x86/kernel/setup_32.c | |||
@@ -677,6 +677,11 @@ void __init setup_arch(char **cmdline_p) | |||
677 | 677 | ||
678 | parse_early_param(); | 678 | parse_early_param(); |
679 | 679 | ||
680 | if (acpi_mps_check()){ | ||
681 | enable_local_apic = -1; | ||
682 | clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); | ||
683 | } | ||
684 | |||
680 | finish_e820_parsing(); | 685 | finish_e820_parsing(); |
681 | 686 | ||
682 | probe_roms(); | 687 | probe_roms(); |
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c index a93300de4da..175c696ec53 100644 --- a/arch/x86/kernel/setup_64.c +++ b/arch/x86/kernel/setup_64.c | |||
@@ -302,6 +302,11 @@ void __init setup_arch(char **cmdline_p) | |||
302 | 302 | ||
303 | parse_early_param(); | 303 | parse_early_param(); |
304 | 304 | ||
305 | if (acpi_mps_check()) { | ||
306 | disable_apic = 1; | ||
307 | clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); | ||
308 | } | ||
309 | |||
305 | #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT | 310 | #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT |
306 | if (init_ohci1394_dma_early) | 311 | if (init_ohci1394_dma_early) |
307 | init_ohci1394_dma_on_all_controllers(); | 312 | init_ohci1394_dma_on_all_controllers(); |
@@ -723,6 +728,10 @@ static void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c) | |||
723 | cpu_devs[c->x86_vendor]->c_early_init(c); | 728 | cpu_devs[c->x86_vendor]->c_early_init(c); |
724 | 729 | ||
725 | validate_pat_support(c); | 730 | validate_pat_support(c); |
731 | |||
732 | /* early_param could clear that, but recall get it set again */ | ||
733 | if (disable_apic) | ||
734 | clear_cpu_cap(c, X86_FEATURE_APIC); | ||
726 | } | 735 | } |
727 | 736 | ||
728 | /* | 737 | /* |