Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
[pandora-kernel.git] / arch / i386 / kernel / acpi / boot.c
index b66c13c..447fa9e 100644 (file)
 
 #ifdef CONFIG_X86_64
 
-static inline void acpi_madt_oem_check(char *oem_id, char *oem_table_id)
-{
-}
 extern void __init clustered_apic_check(void);
-static inline int ioapic_setup_disabled(void)
-{
-       return 0;
-}
 
+extern int gsi_irq_sharing(int gsi);
 #include <asm/proto.h>
 
+static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return 0; }
+
+
 #else                          /* X86 */
 
 #ifdef CONFIG_X86_LOCAL_APIC
@@ -57,6 +54,8 @@ static inline int ioapic_setup_disabled(void)
 #include <mach_mpparse.h>
 #endif                         /* CONFIG_X86_LOCAL_APIC */
 
+static inline int gsi_irq_sharing(int gsi) { return gsi; }
+
 #endif                         /* X86 */
 
 #define BAD_MADT_ENTRY(entry, end) (                                       \
@@ -249,9 +248,7 @@ acpi_parse_lapic(acpi_table_entry_header * header, const unsigned long end)
 
        acpi_table_print_madt_entry(header);
 
-       /* no utility in registering a disabled processor */
-       if (processor->flags.enabled == 0)
-               return 0;
+       /* Register even disabled CPUs for cpu hotplug */
 
        x86_acpiid_to_apicid[processor->acpi_id] = processor->id;
 
@@ -459,7 +456,7 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
                *irq = IO_APIC_VECTOR(gsi);
        else
 #endif
-               *irq = gsi;
+               *irq = gsi_irq_sharing(gsi);
        return 0;
 }
 
@@ -543,7 +540,7 @@ acpi_scan_rsdp(unsigned long start, unsigned long length)
         * RSDP signature.
         */
        for (offset = 0; offset < length; offset += 16) {
-               if (strncmp((char *)(start + offset), "RSD PTR ", sig_len))
+               if (strncmp((char *)(phys_to_virt(start) + offset), "RSD PTR ", sig_len))
                        continue;
                return (start + offset);
        }
@@ -641,6 +638,13 @@ static int __init acpi_parse_fadt(unsigned long phys, unsigned long size)
                        return 0;
 
                pmtmr_ioport = fadt->xpm_tmr_blk.address;
+               /*
+                * "X" fields are optional extensions to the original V1.0
+                * fields, so we must selectively expand V1.0 fields if the
+                * corresponding X field is zero.
+                */
+               if (!pmtmr_ioport)
+                       pmtmr_ioport = fadt->V1_pm_tmr_blk;
        } else {
                /* FADT rev. 1 */
                pmtmr_ioport = fadt->V1_pm_tmr_blk;