[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 7/7] x86: cleanup bogus CONFIG_ACPI_PCI uses
We're building for one case (CONFIG_ACPI_PCI defined) only, yet still had the other case's code in there. Additionally there was quite a bit of pseudo-duplication between disabled(!) DMI scan and ACPI boot code. acpi_pci_disabled had only a single reader, which is off by default (i.e. must be enable on the command line), so it seems pointless to keep it. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx> --- a/xen/arch/x86/acpi/boot.c +++ b/xen/arch/x86/acpi/boot.c @@ -43,21 +43,13 @@ #include <mach_apic.h> #include <mach_mpparse.h> -#define CONFIG_ACPI_PCI - #define BAD_MADT_ENTRY(entry, end) ( \ (!entry) || (unsigned long)entry + sizeof(*entry) > end || \ ((struct acpi_subtable_header *)entry)->length != sizeof(*entry)) #define PREFIX "ACPI: " -#ifdef CONFIG_ACPI_PCI bool_t __initdata acpi_noirq; /* skip ACPI IRQ initialization */ -bool_t __initdata acpi_pci_disabled; /* skip ACPI PCI scan and IRQ initialization */ -#else -bool_t __initdata acpi_noirq = 1; -bool_t __initdata acpi_pci_disabled = 1; -#endif bool_t __initdata acpi_ht = 1; /* enable HT */ bool_t __initdata acpi_lapic; @@ -572,7 +564,6 @@ static void __init acpi_process_madt(voi */ error = acpi_parse_madt_ioapic_entries(); if (!error) { - acpi_irq_balance_set(NULL); acpi_ioapic = 1; smp_found_config = 1; @@ -604,16 +595,6 @@ static int __init disable_acpi_irq(struc return 0; } -static int __init disable_acpi_pci(struct dmi_system_id *d) -{ - if (!acpi_force) { - printk(KERN_NOTICE "%s detected: force use of pci=noacpi\n", - d->ident); - /*acpi_disable_pci();*/ - } - return 0; -} - static int __init dmi_disable_acpi(struct dmi_system_id *d) { if (!acpi_force) { @@ -774,29 +755,6 @@ static struct dmi_system_id __initdata a "ASUS A7V ACPI BIOS Revision 1007"), }, }, - - /* - * Boxes that need ACPI PCI IRQ routing and PCI scan disabled - */ - { /* _BBN 0 bug */ - .callback = disable_acpi_pci, - .ident = "ASUS PR-DLS", - .matches = { - DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), - DMI_MATCH(DMI_BOARD_NAME, "PR-DLS"), - DMI_MATCH(DMI_BIOS_VERSION, - "ASUS PR-DLS ACPI BIOS Revision 1010"), - DMI_MATCH(DMI_BIOS_DATE, "03/21/2003") - }, - }, - { - .callback = disable_acpi_pci, - .ident = "Acer TravelMate 36x Laptop", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Acer"), - DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"), - }, - }, {} }; --- a/xen/arch/x86/dmi_scan.c +++ b/xen/arch/x86/dmi_scan.c @@ -229,27 +229,6 @@ static __init __attribute__((unused)) in } #endif -#ifdef CONFIG_ACPI_PCI -static __init int disable_acpi_irq(struct dmi_blacklist *d) -{ - if (!acpi_force) { - printk(KERN_NOTICE "%s detected: force use of acpi=noirq\n", - d->ident); - acpi_noirq_set(); - } - return 0; -} -static __init int disable_acpi_pci(struct dmi_blacklist *d) -{ - if (!acpi_force) { - printk(KERN_NOTICE "%s detected: force use of pci=noacpi\n", - d->ident); - acpi_disable_pci(); - } - return 0; -} -#endif - /* * Process the DMI blacklists */ @@ -354,35 +333,6 @@ static __initdata struct dmi_blacklist d #endif // CONFIG_ACPI_BOOT -#ifdef CONFIG_ACPI_PCI - /* - * Boxes that need ACPI PCI IRQ routing disabled - */ - - { disable_acpi_irq, "ASUS A7V", { - MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"), - MATCH(DMI_BOARD_NAME, "<A7V>"), - /* newer BIOS, Revision 1011, does work */ - MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1007"), - NO_MATCH }}, - - /* - * Boxes that need ACPI PCI IRQ routing and PCI scan disabled - */ - { disable_acpi_pci, "ASUS PR-DLS", { /* _BBN 0 bug */ - MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), - MATCH(DMI_BOARD_NAME, "PR-DLS"), - MATCH(DMI_BIOS_VERSION, "ASUS PR-DLS ACPI BIOS Revision 1010"), - MATCH(DMI_BIOS_DATE, "03/21/2003") }}, - - { disable_acpi_pci, "Acer TravelMate 36x Laptop", { - MATCH(DMI_SYS_VENDOR, "Acer"), - MATCH(DMI_PRODUCT_NAME, "TravelMate 360"), - NO_MATCH, NO_MATCH - } }, - -#endif - { NULL, } }; --- a/xen/arch/x86/x86_64/mmconf-fam10h.c +++ b/xen/arch/x86/x86_64/mmconf-fam10h.c @@ -146,21 +146,14 @@ void __cpuinit fam10h_check_enable_mmcfg /* try to make sure that AP's setting is identical to BSP setting */ if (val & FAM10H_MMIO_CONF_ENABLE) { - unsigned busnbits; - busnbits = (val >> FAM10H_MMIO_CONF_BUSRANGE_SHIFT) & - FAM10H_MMIO_CONF_BUSRANGE_MASK; - - /* only trust the one handle 256 buses, if acpi=off */ - if (!acpi_pci_disabled || busnbits >= 8) { - u64 base = val & MASK; - - if (!fam10h_pci_mmconf_base) { - fam10h_pci_mmconf_base = base; - return; - } - if (fam10h_pci_mmconf_base == base) - return; + u64 base = val & MASK; + + if (!fam10h_pci_mmconf_base) { + fam10h_pci_mmconf_base = base; + return; } + if (fam10h_pci_mmconf_base == base) + return; } /* --- a/xen/include/asm-ia64/linux-xen/asm/acpi.h +++ b/xen/include/asm-ia64/linux-xen/asm/acpi.h @@ -96,8 +96,6 @@ ia64_acpi_release_global_lock (unsigned ((Acq) = ia64_acpi_release_global_lock(&facs->global_lock)) #define acpi_disabled 0 /* ACPI always enabled on IA64 */ -#define acpi_noirq 0 /* ACPI always enabled on IA64 */ -#define acpi_pci_disabled 0 /* ACPI PCI always enabled on IA64 */ #define acpi_strict 1 /* no ACPI spec workarounds on IA64 */ #define acpi_processor_cstate_check(x) (x) /* no idle limits on IA64 :) */ static inline void disable_acpi(void) { } --- a/xen/include/asm-x86/acpi.h +++ b/xen/include/asm-x86/acpi.h @@ -79,8 +79,7 @@ int __acpi_release_global_lock(unsigned :"0"(n_hi), "1"(n_lo)) extern bool_t acpi_lapic, acpi_ioapic, acpi_noirq; -extern bool_t acpi_force, acpi_ht; -extern bool_t acpi_disabled, acpi_pci_disabled; +extern bool_t acpi_force, acpi_ht, acpi_disabled; extern bool_t acpi_skip_timer_override; extern u32 acpi_smi_cmd; extern u8 acpi_enable_value, acpi_disable_value; @@ -90,7 +89,6 @@ static inline void disable_acpi(void) { acpi_disabled = 1; acpi_ht = 0; - acpi_pci_disabled = 1; acpi_noirq = 1; } @@ -98,12 +96,6 @@ static inline void disable_acpi(void) #define FIX_ACPI_PAGES 4 static inline void acpi_noirq_set(void) { acpi_noirq = 1; } -static inline void acpi_disable_pci(void) -{ - acpi_pci_disabled = 1; - acpi_noirq_set(); -} -static inline int acpi_irq_balance_set(char *str) { return 0; } /* routines for saving/restoring kernel state */ extern int acpi_save_state_mem(void); Attachment:
x86-acpi-pci-cleanup.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |