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 @@
#define PREFIX "ACPI: "
extern int acpi_disabled;
extern int acpi_irq;
extern int acpi_ht;
int acpi_noirq __initdata = 0; /* skip ACPI IRQ initialization */
int acpi_ht __initdata = 1; /* enable HT */
int acpi_lapic = 0;
int acpi_ioapic = 0;
......@@ -499,7 +498,7 @@ acpi_boot_init (void)
* If MPS is present, it will handle them,
* otherwise the system will stay in PIC mode
*/
if (acpi_disabled || !acpi_irq) {
if (acpi_disabled || acpi_noirq) {
return 1;
}
......
......@@ -6,6 +6,7 @@
#include <linux/module.h>
#include <linux/apm_bios.h>
#include <linux/slab.h>
#include <asm/acpi.h>
#include <asm/io.h>
#include <linux/pm.h>
#include <asm/system.h>
......@@ -505,6 +506,7 @@ static __init int print_if_true(struct dmi_blacklist *d)
}
#ifdef CONFIG_ACPI_BOOT
extern int acpi_disabled, acpi_force;
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;
}
#ifdef CONFIG_ACPI_BOOT
extern int acpi_ht;
/*
......@@ -543,10 +543,8 @@ static __init __attribute__((unused)) int force_acpi_ht(struct dmi_blacklist *d)
#ifdef CONFIG_ACPI_PCI
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);
pci_disable_acpi();
acpi_noirq_set();
return 0;
}
#endif
......
......@@ -72,13 +72,10 @@ EXPORT_SYMBOL_GPL(mmu_cr4_features);
EXPORT_SYMBOL(acpi_disabled);
#ifdef CONFIG_ACPI_BOOT
int acpi_irq __initdata = 1; /* enable IRQ */
int acpi_ht __initdata = 1; /* enable HT */
extern int __initdata acpi_ht;
int __initdata acpi_force = 0;
#endif
int acpi_force __initdata = 0;
int MCA_bus;
/* for MCA, but anyone else can use it if they want */
unsigned int machine_id;
......@@ -550,7 +547,7 @@ static void __init parse_cmdline_early (char ** cmdline_p)
/* "pci=noacpi" disables ACPI interrupt routing */
else if (!memcmp(from, "pci=noacpi", 10)) {
acpi_irq = 0;
acpi_noirq_set();
}
#ifdef CONFIG_X86_LOCAL_APIC
......
......@@ -18,7 +18,7 @@ static int __init pci_acpi_init(void)
if (pcibios_scanned)
return 0;
if (!(pci_probe & PCI_NO_ACPI_ROUTING)) {
if (!acpi_noirq) {
if (!acpi_pci_irq_init()) {
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");
......@@ -31,15 +31,4 @@ static int __init pci_acpi_init(void)
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);
......@@ -9,6 +9,7 @@
#include <linux/ioport.h>
#include <linux/init.h>
#include <asm/acpi.h>
#include <asm/segment.h>
#include <asm/io.h>
#include <asm/smp.h>
......@@ -197,12 +198,10 @@ char * __devinit pcibios_setup(char *str)
return NULL;
}
#endif
#ifdef CONFIG_ACPI_PCI
else if (!strcmp(str, "noacpi")) {
pci_probe |= PCI_NO_ACPI_ROUTING;
acpi_noirq_set();
return NULL;
}
#endif
#ifndef CONFIG_X86_VISWS
else if (!strcmp(str, "usepirqmask")) {
pci_probe |= PCI_USE_PIRQ_MASK;
......
......@@ -22,7 +22,6 @@
#define PCI_ASSIGN_ROMS 0x1000
#define PCI_BIOS_IRQ_SCAN 0x2000
#define PCI_ASSIGN_ALL_BUSSES 0x4000
#define PCI_NO_ACPI_ROUTING 0x8000
extern unsigned int pci_probe;
......
......@@ -46,11 +46,13 @@
#include <asm/proto.h>
#include <asm/tlbflush.h>
int acpi_lapic = 0;
int acpi_ioapic = 0;
#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
......@@ -267,7 +269,7 @@ acpi_parse_hpet (
* 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
acpi_pic_sci_set_trigger(unsigned int irq)
......@@ -479,7 +481,7 @@ acpi_boot_init (void)
* If MPS is present, it will handle them,
* otherwise the system will stay in PIC mode
*/
if (acpi_disabled) {
if (acpi_disabled || acpi_noirq) {
return 1;
}
......
......@@ -65,7 +65,11 @@ unsigned long mmu_cr4_features;
EXPORT_SYMBOL_GPL(mmu_cr4_features);
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 */
unsigned long pci_mem_start = 0x10000000;
......@@ -195,6 +199,7 @@ static __init void parse_cmdline_early (char ** cmdline_p)
if (c != ' ')
goto next_char;
#ifdef CONFIG_ACPI_BOOT
/* "acpi=off" disables both ACPI table parsing and interpreter init */
if (!memcmp(from, "acpi=off", 8))
acpi_disabled = 1;
......@@ -210,6 +215,7 @@ static __init void parse_cmdline_early (char ** cmdline_p)
if (!memcmp(from, "acpi=ht", 7)) {
acpi_ht = 1;
}
#endif
if (!memcmp(from, "nolapic", 7) ||
!memcmp(from, "disableapic", 11))
......
......@@ -109,7 +109,7 @@
#ifdef CONFIG_ACPI_BOOT
extern int acpi_lapic;
extern int acpi_ioapic;
extern int acpi_noirq;
/* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */
#define FIX_ACPI_PAGES 4
......@@ -140,8 +140,10 @@ static inline void disable_ioapic_setup(void)
#endif
#ifdef CONFIG_ACPI_PCI
static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
extern int acpi_irq_balance_set(char *str);
#else
static inline void acpi_noirq_set(void) { }
static inline int acpi_irq_balance_set(char *str) { return 0; }
#endif
......
......@@ -104,29 +104,24 @@
:"0"(n_hi), "1"(n_lo))
#ifndef CONFIG_ACPI_BOOT
#define acpi_lapic 0
#define acpi_ioapic 0
#else
#ifdef CONFIG_X86_LOCAL_APIC
#ifdef CONFIG_ACPI_BOOT
extern int acpi_lapic;
#else
#define acpi_lapic 0
#endif
#ifdef CONFIG_X86_IO_APIC
extern int acpi_ioapic;
#else
#define acpi_ioapic 0
#endif
extern int acpi_noirq;
/* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */
#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
static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
extern int acpi_irq_balance_set(char *str);
#else
static inline void acpi_noirq_set(void) { }
static inline int acpi_irq_balance_set(char *str) { return 0; }
#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