Commit a07bfd00 authored by Len Brown's avatar Len Brown

[ACPI] replace multiple flags with acpi_noirq -- ala 2.4

parent 1c267864
...@@ -40,9 +40,8 @@ ...@@ -40,9 +40,8 @@
#define PREFIX "ACPI: " #define PREFIX "ACPI: "
extern int acpi_disabled; int acpi_noirq __initdata = 0; /* skip ACPI IRQ initialization */
extern int acpi_irq; int acpi_ht __initdata = 1; /* enable HT */
extern int acpi_ht;
int acpi_lapic = 0; int acpi_lapic = 0;
int acpi_ioapic = 0; int acpi_ioapic = 0;
...@@ -499,7 +498,7 @@ acpi_boot_init (void) ...@@ -499,7 +498,7 @@ acpi_boot_init (void)
* If MPS is present, it will handle them, * If MPS is present, it will handle them,
* otherwise the system will stay in PIC mode * otherwise the system will stay in PIC mode
*/ */
if (acpi_disabled || !acpi_irq) { if (acpi_disabled || acpi_noirq) {
return 1; return 1;
} }
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/apm_bios.h> #include <linux/apm_bios.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <asm/acpi.h>
#include <asm/io.h> #include <asm/io.h>
#include <linux/pm.h> #include <linux/pm.h>
#include <asm/system.h> #include <asm/system.h>
...@@ -505,6 +506,7 @@ static __init int print_if_true(struct dmi_blacklist *d) ...@@ -505,6 +506,7 @@ static __init int print_if_true(struct dmi_blacklist *d)
} }
#ifdef CONFIG_ACPI_BOOT
extern int acpi_disabled, acpi_force; extern int acpi_disabled, acpi_force;
static __init __attribute__((unused)) int acpi_disable(struct dmi_blacklist *d) static __init __attribute__((unused)) int acpi_disable(struct dmi_blacklist *d)
...@@ -519,8 +521,6 @@ static __init __attribute__((unused)) int acpi_disable(struct dmi_blacklist *d) ...@@ -519,8 +521,6 @@ static __init __attribute__((unused)) int acpi_disable(struct dmi_blacklist *d)
return 0; return 0;
} }
#ifdef CONFIG_ACPI_BOOT
extern int acpi_ht; extern int acpi_ht;
/* /*
...@@ -543,10 +543,8 @@ static __init __attribute__((unused)) int force_acpi_ht(struct dmi_blacklist *d) ...@@ -543,10 +543,8 @@ static __init __attribute__((unused)) int force_acpi_ht(struct dmi_blacklist *d)
#ifdef CONFIG_ACPI_PCI #ifdef CONFIG_ACPI_PCI
static __init int disable_acpi_pci(struct dmi_blacklist *d) static __init int disable_acpi_pci(struct dmi_blacklist *d)
{ {
extern __init void pci_disable_acpi(void) ;
printk(KERN_NOTICE "%s detected: force use of pci=noacpi\n", d->ident); printk(KERN_NOTICE "%s detected: force use of pci=noacpi\n", d->ident);
pci_disable_acpi(); acpi_noirq_set();
return 0; return 0;
} }
#endif #endif
......
...@@ -72,13 +72,10 @@ EXPORT_SYMBOL_GPL(mmu_cr4_features); ...@@ -72,13 +72,10 @@ EXPORT_SYMBOL_GPL(mmu_cr4_features);
EXPORT_SYMBOL(acpi_disabled); EXPORT_SYMBOL(acpi_disabled);
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI_BOOT
int acpi_irq __initdata = 1; /* enable IRQ */ extern int __initdata acpi_ht;
int acpi_ht __initdata = 1; /* enable HT */ int __initdata acpi_force = 0;
#endif #endif
int acpi_force __initdata = 0;
int MCA_bus; int MCA_bus;
/* for MCA, but anyone else can use it if they want */ /* for MCA, but anyone else can use it if they want */
unsigned int machine_id; unsigned int machine_id;
...@@ -550,7 +547,7 @@ static void __init parse_cmdline_early (char ** cmdline_p) ...@@ -550,7 +547,7 @@ static void __init parse_cmdline_early (char ** cmdline_p)
/* "pci=noacpi" disables ACPI interrupt routing */ /* "pci=noacpi" disables ACPI interrupt routing */
else if (!memcmp(from, "pci=noacpi", 10)) { else if (!memcmp(from, "pci=noacpi", 10)) {
acpi_irq = 0; acpi_noirq_set();
} }
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
......
...@@ -18,7 +18,7 @@ static int __init pci_acpi_init(void) ...@@ -18,7 +18,7 @@ static int __init pci_acpi_init(void)
if (pcibios_scanned) if (pcibios_scanned)
return 0; return 0;
if (!(pci_probe & PCI_NO_ACPI_ROUTING)) { if (!acpi_noirq) {
if (!acpi_pci_irq_init()) { if (!acpi_pci_irq_init()) {
printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n"); printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n");
printk(KERN_INFO "PCI: if you experience problems, try using option 'pci=noacpi' or even 'acpi=off'\n"); printk(KERN_INFO "PCI: if you experience problems, try using option 'pci=noacpi' or even 'acpi=off'\n");
...@@ -31,15 +31,4 @@ static int __init pci_acpi_init(void) ...@@ -31,15 +31,4 @@ static int __init pci_acpi_init(void)
return 0; return 0;
} }
/*
* pci_disable_acpi()
* act like pci=noacpi seen on command line
* called by DMI blacklist code
*/
__init void pci_disable_acpi(void)
{
pci_probe |= PCI_NO_ACPI_ROUTING;
}
subsys_initcall(pci_acpi_init); subsys_initcall(pci_acpi_init);
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/acpi.h>
#include <asm/segment.h> #include <asm/segment.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/smp.h> #include <asm/smp.h>
...@@ -197,12 +198,10 @@ char * __devinit pcibios_setup(char *str) ...@@ -197,12 +198,10 @@ char * __devinit pcibios_setup(char *str)
return NULL; return NULL;
} }
#endif #endif
#ifdef CONFIG_ACPI_PCI
else if (!strcmp(str, "noacpi")) { else if (!strcmp(str, "noacpi")) {
pci_probe |= PCI_NO_ACPI_ROUTING; acpi_noirq_set();
return NULL; return NULL;
} }
#endif
#ifndef CONFIG_X86_VISWS #ifndef CONFIG_X86_VISWS
else if (!strcmp(str, "usepirqmask")) { else if (!strcmp(str, "usepirqmask")) {
pci_probe |= PCI_USE_PIRQ_MASK; pci_probe |= PCI_USE_PIRQ_MASK;
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#define PCI_ASSIGN_ROMS 0x1000 #define PCI_ASSIGN_ROMS 0x1000
#define PCI_BIOS_IRQ_SCAN 0x2000 #define PCI_BIOS_IRQ_SCAN 0x2000
#define PCI_ASSIGN_ALL_BUSSES 0x4000 #define PCI_ASSIGN_ALL_BUSSES 0x4000
#define PCI_NO_ACPI_ROUTING 0x8000
extern unsigned int pci_probe; extern unsigned int pci_probe;
......
...@@ -46,11 +46,13 @@ ...@@ -46,11 +46,13 @@
#include <asm/proto.h> #include <asm/proto.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
int acpi_lapic = 0;
int acpi_ioapic = 0;
#define PREFIX "ACPI: " #define PREFIX "ACPI: "
int acpi_noirq __initdata = 0; /* skip ACPI IRQ initialization */
int acpi_ht __initdata = 1; /* enable HT */
int acpi_lapic = 0;
int acpi_ioapic = 0;
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
Boot-time Configuration Boot-time Configuration
...@@ -267,7 +269,7 @@ acpi_parse_hpet ( ...@@ -267,7 +269,7 @@ acpi_parse_hpet (
* ECLR2 is IRQ's 8-15 (IRQ 8, 13 must be 0) * ECLR2 is IRQ's 8-15 (IRQ 8, 13 must be 0)
*/ */
static __initdata acpi_pic_sci_trigger; /* 0: level, 1: edge */ static int __initdata acpi_pic_sci_trigger; /* 0: level, 1: edge */
void __init void __init
acpi_pic_sci_set_trigger(unsigned int irq) acpi_pic_sci_set_trigger(unsigned int irq)
...@@ -479,7 +481,7 @@ acpi_boot_init (void) ...@@ -479,7 +481,7 @@ acpi_boot_init (void)
* If MPS is present, it will handle them, * If MPS is present, it will handle them,
* otherwise the system will stay in PIC mode * otherwise the system will stay in PIC mode
*/ */
if (acpi_disabled) { if (acpi_disabled || acpi_noirq) {
return 1; return 1;
} }
......
...@@ -65,7 +65,11 @@ unsigned long mmu_cr4_features; ...@@ -65,7 +65,11 @@ unsigned long mmu_cr4_features;
EXPORT_SYMBOL_GPL(mmu_cr4_features); EXPORT_SYMBOL_GPL(mmu_cr4_features);
int acpi_disabled = 0; int acpi_disabled = 0;
int acpi_ht = 0;
#ifdef CONFIG_ACPI_BOOT
extern int __initdata acpi_ht;
/* int __initdata acpi_force = 0; */
#endif
/* For PCI or other memory-mapped resources */ /* For PCI or other memory-mapped resources */
unsigned long pci_mem_start = 0x10000000; unsigned long pci_mem_start = 0x10000000;
...@@ -195,6 +199,7 @@ static __init void parse_cmdline_early (char ** cmdline_p) ...@@ -195,6 +199,7 @@ static __init void parse_cmdline_early (char ** cmdline_p)
if (c != ' ') if (c != ' ')
goto next_char; goto next_char;
#ifdef CONFIG_ACPI_BOOT
/* "acpi=off" disables both ACPI table parsing and interpreter init */ /* "acpi=off" disables both ACPI table parsing and interpreter init */
if (!memcmp(from, "acpi=off", 8)) if (!memcmp(from, "acpi=off", 8))
acpi_disabled = 1; acpi_disabled = 1;
...@@ -210,6 +215,7 @@ static __init void parse_cmdline_early (char ** cmdline_p) ...@@ -210,6 +215,7 @@ static __init void parse_cmdline_early (char ** cmdline_p)
if (!memcmp(from, "acpi=ht", 7)) { if (!memcmp(from, "acpi=ht", 7)) {
acpi_ht = 1; acpi_ht = 1;
} }
#endif
if (!memcmp(from, "nolapic", 7) || if (!memcmp(from, "nolapic", 7) ||
!memcmp(from, "disableapic", 11)) !memcmp(from, "disableapic", 11))
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI_BOOT
extern int acpi_lapic; extern int acpi_lapic;
extern int acpi_ioapic; extern int acpi_ioapic;
extern int acpi_noirq;
/* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */ /* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */
#define FIX_ACPI_PAGES 4 #define FIX_ACPI_PAGES 4
...@@ -140,8 +140,10 @@ static inline void disable_ioapic_setup(void) ...@@ -140,8 +140,10 @@ static inline void disable_ioapic_setup(void)
#endif #endif
#ifdef CONFIG_ACPI_PCI #ifdef CONFIG_ACPI_PCI
static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
extern int acpi_irq_balance_set(char *str); extern int acpi_irq_balance_set(char *str);
#else #else
static inline void acpi_noirq_set(void) { }
static inline int acpi_irq_balance_set(char *str) { return 0; } static inline int acpi_irq_balance_set(char *str) { return 0; }
#endif #endif
......
...@@ -104,29 +104,24 @@ ...@@ -104,29 +104,24 @@
:"0"(n_hi), "1"(n_lo)) :"0"(n_hi), "1"(n_lo))
#ifndef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI_BOOT
#define acpi_lapic 0
#define acpi_ioapic 0
#else
#ifdef CONFIG_X86_LOCAL_APIC
extern int acpi_lapic; extern int acpi_lapic;
#else
#define acpi_lapic 0
#endif
#ifdef CONFIG_X86_IO_APIC
extern int acpi_ioapic; extern int acpi_ioapic;
#else extern int acpi_noirq;
#define acpi_ioapic 0
#endif
/* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */ /* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */
#define FIX_ACPI_PAGES 4 #define FIX_ACPI_PAGES 4
#endif /*CONFIG_ACPI_BOOT*/ #else /* !CONFIG_ACPI_BOOT */
#define acpi_lapic 0
#define acpi_ioapic 0
#endif /* !CONFIG_ACPI_BOOT */
#ifdef CONFIG_ACPI_PCI #ifdef CONFIG_ACPI_PCI
static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
extern int acpi_irq_balance_set(char *str); extern int acpi_irq_balance_set(char *str);
#else #else
static inline void acpi_noirq_set(void) { }
static inline int acpi_irq_balance_set(char *str) { return 0; } static inline int acpi_irq_balance_set(char *str) { return 0; }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment