x86: cleanup bogus CONFIG_ACPI_PCI uses
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.
xen/arch/x86/acpi/boot.c +0 -42
@@ -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(strucreturn 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"), - }, - }, {} };
xen/arch/x86/dmi_scan.c +0 -50
62 lines not on this page · raw message
xen/arch/x86/x86_64/mmconf-fam10h.c +7 -14
@@ -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 ; }/*
xen/include/asm-ia64/linux-xen/asm/acpi.h +0 -2
@@ -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 ) { }
xen/include/asm-x86/acpi.h +1 -9
@@ -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 4static 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 );
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.
xen/arch/x86/acpi/boot.c +0 -42
73 lines not on this page · raw message
xen/arch/x86/dmi_scan.c +0 -50
62 lines not on this page · raw message
xen/arch/x86/x86_64/mmconf-fam10h.c +7 -14
@@ -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 ; }/*
xen/include/asm-ia64/linux-xen/asm/acpi.h +0 -2
@@ -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 ) { }
xen/include/asm-x86/acpi.h +1 -9
@@ -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 4static 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 );
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel