]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/acpi/boot.c
Merge branch 'x86/cpu' into x86/core
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / acpi / boot.c
index a31a579a47ca31fbcec827b8ac08624ae38bd186..27ef365e757da7cb55cc9a3ade5b6110b2080326 100644 (file)
@@ -84,8 +84,6 @@ int acpi_lapic;
 int acpi_ioapic;
 int acpi_strict;
 
-static int disable_irq0_through_ioapic __initdata;
-
 u8 acpi_sci_flags __initdata;
 int acpi_sci_override_gsi __initdata;
 int acpi_skip_timer_override __initdata;
@@ -99,6 +97,8 @@ static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
 #warning ACPI uses CMPXCHG, i486 and later hardware
 #endif
 
+static int acpi_mcfg_64bit_base_addr __initdata = FALSE;
+
 /* --------------------------------------------------------------------------
                               Boot-time Configuration
    -------------------------------------------------------------------------- */
@@ -130,7 +130,7 @@ char *__init __acpi_map_table(unsigned long phys, unsigned long size)
        if (!phys || !size)
                return NULL;
 
-       if (phys+size <= (max_pfn_mapped << PAGE_SHIFT))
+       if (phys+size <= (max_low_pfn_mapped << PAGE_SHIFT))
                return __va(phys);
 
        offset = phys & (PAGE_SIZE - 1);
@@ -160,6 +160,14 @@ char *__init __acpi_map_table(unsigned long phys, unsigned long size)
 struct acpi_mcfg_allocation *pci_mmcfg_config;
 int pci_mmcfg_config_num;
 
+static int __init acpi_mcfg_oem_check(struct acpi_table_mcfg *mcfg)
+{
+       if (!strcmp(mcfg->header.oem_id, "SGI"))
+               acpi_mcfg_64bit_base_addr = TRUE;
+
+       return 0;
+}
+
 int __init acpi_parse_mcfg(struct acpi_table_header *header)
 {
        struct acpi_table_mcfg *mcfg;
@@ -192,8 +200,12 @@ int __init acpi_parse_mcfg(struct acpi_table_header *header)
        }
 
        memcpy(pci_mmcfg_config, &mcfg[1], config_size);
+
+       acpi_mcfg_oem_check(mcfg);
+
        for (i = 0; i < pci_mmcfg_config_num; ++i) {
-               if (pci_mmcfg_config[i].address > 0xFFFFFFFF) {
+               if ((pci_mmcfg_config[i].address > 0xFFFFFFFF) &&
+                   !acpi_mcfg_64bit_base_addr) {
                        printk(KERN_ERR PREFIX
                               "MMCONFIG not in low 4GB of memory\n");
                        kfree(pci_mmcfg_config);
@@ -763,7 +775,7 @@ static void __init acpi_register_lapic_address(unsigned long address)
 
        set_fixmap_nocache(FIX_APIC_BASE, address);
        if (boot_cpu_physical_apicid == -1U) {
-               boot_cpu_physical_apicid  = GET_APIC_ID(read_apic_id());
+               boot_cpu_physical_apicid  = read_apic_id();
 #ifdef CONFIG_X86_32
                apic_version[boot_cpu_physical_apicid] =
                         GET_APIC_VERSION(apic_read(APIC_LVR));
@@ -982,10 +994,6 @@ void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi)
        int pin;
        struct mp_config_intsrc mp_irq;
 
-       /* Skip the 8254 timer interrupt (IRQ 0) if requested.  */
-       if (bus_irq == 0 && disable_irq0_through_ioapic)
-               return;
-
        /*
         * Convert 'gsi' to 'ioapic.pin'.
         */
@@ -1027,7 +1035,7 @@ void __init mp_config_acpi_legacy_irqs(void)
        mp_bus_id_to_type[MP_ISA_BUS] = MP_BUS_ISA;
 #endif
        set_bit(MP_ISA_BUS, mp_bus_not_pci);
-       Dprintk("Bus #%d is ISA\n", MP_ISA_BUS);
+       pr_debug("Bus #%d is ISA\n", MP_ISA_BUS);
 
 #ifdef CONFIG_X86_ES7000
        /*
@@ -1052,10 +1060,6 @@ void __init mp_config_acpi_legacy_irqs(void)
        for (i = 0; i < 16; i++) {
                int idx;
 
-               /* Skip the 8254 timer interrupt (IRQ 0) if requested.  */
-               if (i == 0 && disable_irq0_through_ioapic)
-                       continue;
-
                for (idx = 0; idx < mp_irq_entries; idx++) {
                        struct mp_config_intsrc *irq = mp_irqs + idx;
 
@@ -1137,8 +1141,8 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity)
                return gsi;
        }
        if (test_bit(ioapic_pin, mp_ioapic_routing[ioapic].pin_programmed)) {
-               Dprintk(KERN_DEBUG "Pin %d-%d already programmed\n",
-                       mp_ioapic_routing[ioapic].apic_id, ioapic_pin);
+               pr_debug(KERN_DEBUG "Pin %d-%d already programmed\n",
+                        mp_ioapic_routing[ioapic].apic_id, ioapic_pin);
 #ifdef CONFIG_X86_32
                return (gsi < IRQ_COMPRESSION_START ? gsi : gsi_to_irq[gsi]);
 #else
@@ -1347,7 +1351,9 @@ static void __init acpi_process_madt(void)
                                acpi_ioapic = 1;
 
                                smp_found_config = 1;
+#ifdef CONFIG_X86_32
                                setup_apic_routing();
+#endif
                        }
                }
                if (error == -EINVAL) {
@@ -1412,17 +1418,6 @@ static int __init force_acpi_ht(const struct dmi_system_id *d)
        return 0;
 }
 
-/*
- * Don't register any I/O APIC entries for the 8254 timer IRQ.
- */
-static int __init
-dmi_disable_irq0_through_ioapic(const struct dmi_system_id *d)
-{
-       pr_notice("%s detected: disabling IRQ 0 through I/O APIC\n", d->ident);
-       disable_irq0_through_ioapic = 1;
-       return 0;
-}
-
 /*
  * Force ignoring BIOS IRQ0 pin2 override
  */
@@ -1430,7 +1425,6 @@ static int __init dmi_ignore_irq0_timer_override(const struct dmi_system_id *d)
 {
        pr_notice("%s detected: Ignoring BIOS IRQ0 pin2 override\n", d->ident);
        acpi_skip_timer_override = 1;
-       force_mask_ioapic_irq_2();
        return 0;
 }
 
@@ -1601,32 +1595,6 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = {
                     DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
                     },
         },
-       /*
-        * HP laptops which use a DSDT reporting as HP/SB400/10000,
-        * which includes some code which overrides all temperature
-        * trip points to 16C if the INTIN2 input of the I/O APIC
-        * is enabled.  This input is incorrectly designated the
-        * ISA IRQ 0 via an interrupt source override even though
-        * it is wired to the output of the master 8259A and INTIN0
-        * is not connected at all.  Abandon any attempts to route
-        * IRQ 0 through the I/O APIC therefore.
-        */
-       {
-        .callback = dmi_disable_irq0_through_ioapic,
-        .ident = "HP NX6125 laptop",
-        .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
-                    DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq nx6125"),
-                    },
-        },
-       {
-        .callback = dmi_disable_irq0_through_ioapic,
-        .ident = "HP NX6325 laptop",
-        .matches = {
-                    DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
-                    DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq nx6325"),
-                    },
-        },
        /*
         * HP laptops which use a DSDT reporting as HP/SB400/10000,
         * which includes some code which overrides all temperature