X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fi386%2Fkernel%2Facpi%2Fboot-xen.c;fp=arch%2Fi386%2Fkernel%2Facpi%2Fboot-xen.c;h=13be5153419ef51c58fa8aba2b74d5a4957d929f;hb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;hp=6bd4b798fc21ee950c48e9b3a80bbb751f272918;hpb=4e76c8a9fa413ccc09d3f7f664183dcce3555d57;p=linux-2.6.git diff --git a/arch/i386/kernel/acpi/boot-xen.c b/arch/i386/kernel/acpi/boot-xen.c index 6bd4b798f..13be51534 100644 --- a/arch/i386/kernel/acpi/boot-xen.c +++ b/arch/i386/kernel/acpi/boot-xen.c @@ -24,7 +24,6 @@ */ #include -#include #include #include #include @@ -60,7 +59,7 @@ static inline int gsi_irq_sharing(int gsi) { return gsi; } #define BAD_MADT_ENTRY(entry, end) ( \ (!entry) || (unsigned long)entry + sizeof(*entry) > end || \ - ((acpi_table_entry_header *)entry)->length != sizeof(*entry)) + ((acpi_table_entry_header *)entry)->length < sizeof(*entry)) #define PREFIX "ACPI: " @@ -204,6 +203,8 @@ int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size) if (mcfg->config[i].base_reserved) { printk(KERN_ERR PREFIX "MMCONFIG not in low 4GB of memory\n"); + kfree(pci_mmcfg_config); + pci_mmcfg_config_num = 0; return -ENODEV; } } @@ -217,7 +218,7 @@ static int __init acpi_parse_madt(unsigned long phys_addr, unsigned long size) { struct acpi_table_madt *madt = NULL; - if (!phys_addr || !size) + if (!phys_addr || !size || !cpu_has_apic) return -EINVAL; madt = (struct acpi_table_madt *)__acpi_map_table(phys_addr, size); @@ -233,9 +234,8 @@ static int __init acpi_parse_madt(unsigned long phys_addr, unsigned long size) madt->lapic_address); } -#ifndef CONFIG_X86_64 acpi_madt_oem_check(madt->header.oem_id, madt->header.oem_table_id); -#endif + return 0; } @@ -625,9 +625,9 @@ extern u32 pmtmr_ioport; static int __init acpi_parse_fadt(unsigned long phys, unsigned long size) { - struct fadt_descriptor_rev2 *fadt = NULL; + struct fadt_descriptor *fadt = NULL; - fadt = (struct fadt_descriptor_rev2 *)__acpi_map_table(phys, size); + fadt = (struct fadt_descriptor *)__acpi_map_table(phys, size); if (!fadt) { printk(KERN_WARNING PREFIX "Unable to map FADT\n"); return 0; @@ -758,7 +758,7 @@ static int __init acpi_parse_madt_ioapic_entries(void) return -ENODEV; } - if (!cpu_has_apic) + if (!cpu_has_apic) return -ENODEV; /*