diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:26:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:26:51 -0400 |
commit | 5f78e4d33945b291d12765cdd7e4304f437b9361 (patch) | |
tree | 113cea729de15a98bb941cc4afb8d13301534ca7 /arch/x86/kernel/acpi/boot.c | |
parent | 867a89e0b73af48838c7987e80899a1ff26dd6ff (diff) | |
parent | 5f0b2976cb2b62668a076f54419c24b8ab677167 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-bigbox-pci
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-bigbox-pci:
x86: add pci=check_enable_amd_mmconf and dmi check
x86: work around io allocation overlap of HT links
acpi: get boot_cpu_id as early for k8_scan_nodes
x86_64: don't need set default res if only have one root bus
x86: double check the multi root bus with fam10h mmconf
x86: multi pci root bus with different io resource range, on 64-bit
x86: use bus conf in NB conf fun1 to get bus range on, on 64-bit
x86: get mp_bus_to_node early
x86 pci: remove checking type for mmconfig probe
x86: remove unneeded check in mmconf reject
driver core: try parent numa_node at first before using default
x86: seperate mmconf for fam10h out from setup_64.c
x86: if acpi=off, force setting the mmconf for fam10h
x86_64: check MSR to get MMCONFIG for AMD Family 10h
x86_64: check and enable MMCONFIG for AMD Family 10h
x86_64: set cfg_size for AMD Family 10h in case MMCONFIG
x86: mmconf enable mcfg early
x86: clear pci_mmcfg_virt when mmcfg get rejected
x86: validate against acpi motherboard resources
Fixed up fairly trivial conflicts in arch/x86/pci/{init.c,pci.h} due to
OLPC support manually.
Diffstat (limited to 'arch/x86/kernel/acpi/boot.c')
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 977ed5cdeaa3..c49ebcc6c41e 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -771,6 +771,32 @@ static void __init acpi_register_lapic_address(unsigned long address) | |||
771 | boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id()); | 771 | boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id()); |
772 | } | 772 | } |
773 | 773 | ||
774 | static int __init early_acpi_parse_madt_lapic_addr_ovr(void) | ||
775 | { | ||
776 | int count; | ||
777 | |||
778 | if (!cpu_has_apic) | ||
779 | return -ENODEV; | ||
780 | |||
781 | /* | ||
782 | * Note that the LAPIC address is obtained from the MADT (32-bit value) | ||
783 | * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value). | ||
784 | */ | ||
785 | |||
786 | count = | ||
787 | acpi_table_parse_madt(ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE, | ||
788 | acpi_parse_lapic_addr_ovr, 0); | ||
789 | if (count < 0) { | ||
790 | printk(KERN_ERR PREFIX | ||
791 | "Error parsing LAPIC address override entry\n"); | ||
792 | return count; | ||
793 | } | ||
794 | |||
795 | acpi_register_lapic_address(acpi_lapic_addr); | ||
796 | |||
797 | return count; | ||
798 | } | ||
799 | |||
774 | static int __init acpi_parse_madt_lapic_entries(void) | 800 | static int __init acpi_parse_madt_lapic_entries(void) |
775 | { | 801 | { |
776 | int count; | 802 | int count; |
@@ -901,6 +927,33 @@ static inline int acpi_parse_madt_ioapic_entries(void) | |||
901 | } | 927 | } |
902 | #endif /* !CONFIG_X86_IO_APIC */ | 928 | #endif /* !CONFIG_X86_IO_APIC */ |
903 | 929 | ||
930 | static void __init early_acpi_process_madt(void) | ||
931 | { | ||
932 | #ifdef CONFIG_X86_LOCAL_APIC | ||
933 | int error; | ||
934 | |||
935 | if (!acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt)) { | ||
936 | |||
937 | /* | ||
938 | * Parse MADT LAPIC entries | ||
939 | */ | ||
940 | error = early_acpi_parse_madt_lapic_addr_ovr(); | ||
941 | if (!error) { | ||
942 | acpi_lapic = 1; | ||
943 | smp_found_config = 1; | ||
944 | } | ||
945 | if (error == -EINVAL) { | ||
946 | /* | ||
947 | * Dell Precision Workstation 410, 610 come here. | ||
948 | */ | ||
949 | printk(KERN_ERR PREFIX | ||
950 | "Invalid BIOS MADT, disabling ACPI\n"); | ||
951 | disable_acpi(); | ||
952 | } | ||
953 | } | ||
954 | #endif | ||
955 | } | ||
956 | |||
904 | static void __init acpi_process_madt(void) | 957 | static void __init acpi_process_madt(void) |
905 | { | 958 | { |
906 | #ifdef CONFIG_X86_LOCAL_APIC | 959 | #ifdef CONFIG_X86_LOCAL_APIC |
@@ -1233,6 +1286,23 @@ int __init acpi_boot_table_init(void) | |||
1233 | return 0; | 1286 | return 0; |
1234 | } | 1287 | } |
1235 | 1288 | ||
1289 | int __init early_acpi_boot_init(void) | ||
1290 | { | ||
1291 | /* | ||
1292 | * If acpi_disabled, bail out | ||
1293 | * One exception: acpi=ht continues far enough to enumerate LAPICs | ||
1294 | */ | ||
1295 | if (acpi_disabled && !acpi_ht) | ||
1296 | return 1; | ||
1297 | |||
1298 | /* | ||
1299 | * Process the Multiple APIC Description Table (MADT), if present | ||
1300 | */ | ||
1301 | early_acpi_process_madt(); | ||
1302 | |||
1303 | return 0; | ||
1304 | } | ||
1305 | |||
1236 | int __init acpi_boot_init(void) | 1306 | int __init acpi_boot_init(void) |
1237 | { | 1307 | { |
1238 | /* | 1308 | /* |