Commit 30066557 authored by Len Brown's avatar Len Brown

Merge intel.com:/home/lenb/src/linux-acpi-test-2.6.5

into intel.com:/home/lenb/src/linux-acpi-test-2.6.6
parents 7ce42ae1 f8bdcc51
...@@ -91,13 +91,14 @@ running once the system is up. ...@@ -91,13 +91,14 @@ running once the system is up.
acpi= [HW,ACPI] Advanced Configuration and Power Interface acpi= [HW,ACPI] Advanced Configuration and Power Interface
Format: { force | off | ht | strict } Format: { force | off | ht | strict }
force -- enables ACPI for systems with default off force -- enable ACPI if default was off
off -- disabled ACPI for systems with default on off -- disable ACPI if default was on
noirq -- do not use ACPI for IRQ routing
ht -- run only enough ACPI to enable Hyper Threading ht -- run only enough ACPI to enable Hyper Threading
strict -- Be less tolerant of platforms that are not strict -- Be less tolerant of platforms that are not
strictly ACPI specification compliant. strictly ACPI specification compliant.
See also Documentation/pm.txt. See also Documentation/pm.txt, pci=noacpi
acpi_sleep= [HW,ACPI] Sleep options acpi_sleep= [HW,ACPI] Sleep options
Format: { s3_bios, s3_mode } Format: { s3_bios, s3_mode }
...@@ -122,6 +123,10 @@ running once the system is up. ...@@ -122,6 +123,10 @@ running once the system is up.
acpi_serialize [HW,ACPI] force serialization of AML methods acpi_serialize [HW,ACPI] force serialization of AML methods
acpi_skip_timer_override [HW,ACPI]
Recognize and ignore IRQ0/pin2 Interrupt Override.
For broken nForce2 BIOS resulting in XT-PIC timer.
ad1816= [HW,OSS] ad1816= [HW,OSS]
Format: <io>,<irq>,<dma>,<dma2> Format: <io>,<irq>,<dma>,<dma2>
See also Documentation/sound/oss/AD1816. See also Documentation/sound/oss/AD1816.
...@@ -831,7 +836,8 @@ running once the system is up. ...@@ -831,7 +836,8 @@ running once the system is up.
and Omnibook XE3 notebooks. This will and Omnibook XE3 notebooks. This will
have no effect if ACPI IRQ routing is have no effect if ACPI IRQ routing is
enabled. enabled.
noacpi [IA-32] Do not use ACPI for IRQ routing. noacpi [IA-32] Do not use ACPI for IRQ routing
or for PCI scanning.
pcmv= [HW,PCMCIA] BadgePAD 4 pcmv= [HW,PCMCIA] BadgePAD 4
......
...@@ -53,7 +53,13 @@ static inline int ioapic_setup_disabled(void) { return 0; } ...@@ -53,7 +53,13 @@ static inline int ioapic_setup_disabled(void) { return 0; }
#define PREFIX "ACPI: " #define PREFIX "ACPI: "
#ifdef CONFIG_ACPI_PCI
int acpi_noirq __initdata; /* skip ACPI IRQ initialization */ int acpi_noirq __initdata; /* skip ACPI IRQ initialization */
int acpi_pci_disabled __initdata; /* skip ACPI PCI scan and IRQ initialization */
#else
int acpi_noirq __initdata = 1;
int acpi_pci_disabled __initdata = 1;
#endif
int acpi_ht __initdata = 1; /* enable HT */ int acpi_ht __initdata = 1; /* enable HT */
int acpi_lapic; int acpi_lapic;
...@@ -62,6 +68,7 @@ int acpi_strict; ...@@ -62,6 +68,7 @@ int acpi_strict;
acpi_interrupt_flags acpi_sci_flags __initdata; acpi_interrupt_flags acpi_sci_flags __initdata;
int acpi_sci_override_gsi __initdata; int acpi_sci_override_gsi __initdata;
int acpi_skip_timer_override __initdata;
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE; static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
...@@ -329,6 +336,12 @@ acpi_parse_int_src_ovr ( ...@@ -329,6 +336,12 @@ acpi_parse_int_src_ovr (
return 0; return 0;
} }
if (acpi_skip_timer_override &&
intsrc->bus_irq == 0 && intsrc->global_irq == 2) {
printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n");
return 0;
}
mp_override_legacy_irq ( mp_override_legacy_irq (
intsrc->bus_irq, intsrc->bus_irq,
intsrc->flags.polarity, intsrc->flags.polarity,
...@@ -653,9 +666,6 @@ acpi_parse_madt_ioapic_entries(void) ...@@ -653,9 +666,6 @@ acpi_parse_madt_ioapic_entries(void)
return count; return count;
} }
/* Build a default routing table for legacy (ISA) interrupts. */
mp_config_acpi_legacy_irqs();
count = acpi_table_parse_madt(ACPI_MADT_INT_SRC_OVR, acpi_parse_int_src_ovr, NR_IRQ_VECTORS); count = acpi_table_parse_madt(ACPI_MADT_INT_SRC_OVR, acpi_parse_int_src_ovr, NR_IRQ_VECTORS);
if (count < 0) { if (count < 0) {
printk(KERN_ERR PREFIX "Error parsing interrupt source overrides entry\n"); printk(KERN_ERR PREFIX "Error parsing interrupt source overrides entry\n");
...@@ -670,6 +680,9 @@ acpi_parse_madt_ioapic_entries(void) ...@@ -670,6 +680,9 @@ acpi_parse_madt_ioapic_entries(void)
if (!acpi_sci_override_gsi) if (!acpi_sci_override_gsi)
acpi_sci_ioapic_setup(acpi_fadt.sci_int, 0, 0); acpi_sci_ioapic_setup(acpi_fadt.sci_int, 0, 0);
/* Fill in identity legacy mapings where no override */
mp_config_acpi_legacy_irqs();
count = acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src, NR_IRQ_VECTORS); count = acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src, NR_IRQ_VECTORS);
if (count < 0) { if (count < 0) {
printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n"); printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n");
......
...@@ -412,30 +412,6 @@ static __init int swab_apm_power_in_minutes(struct dmi_blacklist *d) ...@@ -412,30 +412,6 @@ static __init int swab_apm_power_in_minutes(struct dmi_blacklist *d)
return 0; return 0;
} }
/*
* The Intel 440GX hall of shame.
*
* On many (all we have checked) of these boxes the $PIRQ table is wrong.
* The MP1.4 table is right however and so SMP kernels tend to work.
*/
static __init int broken_pirq(struct dmi_blacklist *d)
{
printk(KERN_INFO " *** Possibly defective BIOS detected (irqtable)\n");
printk(KERN_INFO " *** Many BIOSes matching this signature have incorrect IRQ routing tables.\n");
printk(KERN_INFO " *** If you see IRQ problems, in particular SCSI resets and hangs at boot\n");
printk(KERN_INFO " *** contact your hardware vendor and ask about updates.\n");
printk(KERN_INFO " *** Building an SMP kernel may evade the bug some of the time.\n");
#ifdef CONFIG_X86_IO_APIC
{
extern int skip_ioapic_setup;
skip_ioapic_setup = 0;
}
#endif
return 0;
}
/* /*
* ASUS K7V-RM has broken ACPI table defining sleep modes * ASUS K7V-RM has broken ACPI table defining sleep modes
*/ */
...@@ -555,14 +531,33 @@ static __init __attribute__((unused)) int force_acpi_ht(struct dmi_blacklist *d) ...@@ -555,14 +531,33 @@ static __init __attribute__((unused)) int force_acpi_ht(struct dmi_blacklist *d)
#endif #endif
#ifdef CONFIG_ACPI_PCI #ifdef CONFIG_ACPI_PCI
static __init int disable_acpi_irq(struct dmi_blacklist *d)
{
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) static __init int disable_acpi_pci(struct dmi_blacklist *d)
{ {
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);
acpi_noirq_set(); acpi_disable_pci();
return 0; return 0;
} }
#endif #endif
/*
* early nForce2 reference BIOS shipped with a
* bogus ACPI IRQ0 -> pin2 interrupt override -- ignore it
*/
static __init int ignore_timer_override(struct dmi_blacklist *d)
{
extern int acpi_skip_timer_override;
printk(KERN_NOTICE "%s detected: BIOS IRQ0 pin2 override"
" will be ignored\n", d->ident);
acpi_skip_timer_override = 1;
return 0;
}
/* /*
* Process the DMI blacklists * Process the DMI blacklists
*/ */
...@@ -815,52 +810,6 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={ ...@@ -815,52 +810,6 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={
NO_MATCH, NO_MATCH NO_MATCH, NO_MATCH
} }, } },
/* Problem Intel 440GX bioses */
{ broken_pirq, "SABR1 Bios", { /* Bad $PIR */
MATCH(DMI_BIOS_VENDOR, "Intel Corporation"),
MATCH(DMI_BIOS_VERSION,"SABR1"),
NO_MATCH, NO_MATCH
} },
{ broken_pirq, "l44GX Bios", { /* Bad $PIR */
MATCH(DMI_BIOS_VENDOR, "Intel Corporation"),
MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0094.P10"),
NO_MATCH, NO_MATCH
} },
{ broken_pirq, "l44GX Bios", { /* Bad $PIR */
MATCH(DMI_BIOS_VENDOR, "Intel Corporation"),
MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0115.P12"),
NO_MATCH, NO_MATCH
} },
{ broken_pirq, "l44GX Bios", { /* Bad $PIR */
MATCH(DMI_BIOS_VENDOR, "Intel Corporation"),
MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0120.P12"),
NO_MATCH, NO_MATCH
} },
{ broken_pirq, "l44GX Bios", { /* Bad $PIR */
MATCH(DMI_BIOS_VENDOR, "Intel Corporation"),
MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0125.P13"),
NO_MATCH, NO_MATCH
} },
{ broken_pirq, "l44GX Bios", { /* Bad $PIR */
MATCH(DMI_BIOS_VENDOR, "Intel Corporation"),
MATCH(DMI_BIOS_VERSION,"L440GX0.86B.0066.P07.9906041405"),
NO_MATCH, NO_MATCH
} },
{ broken_pirq, "IBM xseries 370", { /* Bad $PIR */
MATCH(DMI_BIOS_VENDOR, "IBM"),
MATCH(DMI_BIOS_VERSION,"MMKT33AUS"),
NO_MATCH, NO_MATCH
} },
/* Intel in disguise - In this case they can't hide and they don't run
too well either... */
{ broken_pirq, "Dell PowerEdge 8450", { /* Bad $PIR */
MATCH(DMI_PRODUCT_NAME, "Dell PowerEdge 8450"),
NO_MATCH, NO_MATCH, NO_MATCH
} },
{ broken_acpi_Sx, "ASUS K7V-RM", { /* Bad ACPI Sx table */ { broken_acpi_Sx, "ASUS K7V-RM", { /* Bad ACPI Sx table */
MATCH(DMI_BIOS_VERSION,"ASUS K7V-RM ACPI BIOS Revision 1003A"), MATCH(DMI_BIOS_VERSION,"ASUS K7V-RM ACPI BIOS Revision 1003A"),
MATCH(DMI_BOARD_NAME, "<K7V-RM>"), MATCH(DMI_BOARD_NAME, "<K7V-RM>"),
...@@ -1018,6 +967,49 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={ ...@@ -1018,6 +967,49 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={
MATCH(DMI_BOARD_VENDOR, "IBM"), MATCH(DMI_BOARD_VENDOR, "IBM"),
MATCH(DMI_PRODUCT_NAME, "eserver xSeries 440"), MATCH(DMI_PRODUCT_NAME, "eserver xSeries 440"),
NO_MATCH, NO_MATCH }}, NO_MATCH, NO_MATCH }},
/*
* Systems with nForce2 BIOS timer override bug
* nVidia claims all nForce have timer on pin0,
* and applying this workaround is a NOP on fixed BIOS,
* so prospects are good for replacing these entries
* with something to key of chipset PCI-ID.
*/
{ ignore_timer_override, "Abit NF7-S v2", {
MATCH(DMI_BOARD_VENDOR, "http://www.abit.com.tw/"),
MATCH(DMI_BOARD_NAME, "NF7-S/NF7,NF7-V (nVidia-nForce2)"),
MATCH(DMI_BIOS_VERSION, "6.00 PG"),
MATCH(DMI_BIOS_DATE, "03/24/2004") }},
{ ignore_timer_override, "Asus A7N8X v2", {
MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
MATCH(DMI_BOARD_NAME, "A7N8X2.0"),
MATCH(DMI_BIOS_VERSION, "ASUS A7N8X2.0 Deluxe ACPI BIOS Rev 1007"),
MATCH(DMI_BIOS_DATE, "10/06/2003") }},
{ ignore_timer_override, "Asus A7N8X-X", {
MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
MATCH(DMI_BOARD_NAME, "A7N8X-X"),
MATCH(DMI_BIOS_VERSION, "ASUS A7N8X-X ACPI BIOS Rev 1009"),
MATCH(DMI_BIOS_DATE, "2/3/2004") }},
{ ignore_timer_override, "MSI K7N2-Delta", {
MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
MATCH(DMI_BOARD_NAME, "MS-6570"),
MATCH(DMI_BIOS_VERSION, "6.00 PG"),
MATCH(DMI_BIOS_DATE, "03/29/2004") }},
{ ignore_timer_override, "Shuttle SN41G2", {
MATCH(DMI_BOARD_VENDOR, "Shuttle Inc"),
MATCH(DMI_BOARD_NAME, "FN41"),
MATCH(DMI_BIOS_VERSION, "6.00 PG"),
MATCH(DMI_BIOS_DATE, "01/14/2004") }},
{ ignore_timer_override, "Shuttle AN35N", {
MATCH(DMI_BOARD_VENDOR, "Shuttle Inc"),
MATCH(DMI_BOARD_NAME, "AN35"),
MATCH(DMI_BIOS_VERSION, "6.00 PG"),
MATCH(DMI_BIOS_DATE, "12/05/2003") }},
#endif // CONFIG_ACPI_BOOT #endif // CONFIG_ACPI_BOOT
#ifdef CONFIG_ACPI_PCI #ifdef CONFIG_ACPI_PCI
...@@ -1025,13 +1017,21 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={ ...@@ -1025,13 +1017,21 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={
* Boxes that need ACPI PCI IRQ routing disabled * Boxes that need ACPI PCI IRQ routing disabled
*/ */
{ disable_acpi_pci, "ASUS A7V", { { disable_acpi_irq, "ASUS A7V", {
MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"), MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC"),
MATCH(DMI_BOARD_NAME, "<A7V>"), MATCH(DMI_BOARD_NAME, "<A7V>"),
/* newer BIOS, Revision 1011, does work */ /* newer BIOS, Revision 1011, does work */
MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1007"), MATCH(DMI_BIOS_VERSION, "ASUS A7V ACPI BIOS Revision 1007"),
NO_MATCH }}, 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") }},
#endif #endif
{ NULL, } { NULL, }
......
...@@ -2266,18 +2266,10 @@ static inline void check_timer(void) ...@@ -2266,18 +2266,10 @@ static inline void check_timer(void)
/* /*
* *
* IRQ's that are handled by the old PIC in all cases: * IRQ's that are handled by the PIC in the MPS IOAPIC case.
* - IRQ2 is the cascade IRQ, and cannot be a io-apic IRQ. * - IRQ2 is the cascade IRQ, and cannot be a io-apic IRQ.
* Linux doesn't really care, as it's not actually used * Linux doesn't really care, as it's not actually used
* for any interrupt handling anyway. * for any interrupt handling anyway.
* - There used to be IRQ13 here as well, but all
* MPS-compliant must not use it for FPU coupling and we
* want to use exception 16 anyway. And there are
* systems who connect it to an I/O APIC for other uses.
* Thus we don't mark it special any longer.
*
* Additionally, something is definitely wrong with irq9
* on PIIX4 boards.
*/ */
#define PIC_IRQS (1 << PIC_CASCADE_IR) #define PIC_IRQS (1 << PIC_CASCADE_IR)
...@@ -2285,7 +2277,11 @@ void __init setup_IO_APIC(void) ...@@ -2285,7 +2277,11 @@ void __init setup_IO_APIC(void)
{ {
enable_IO_APIC(); enable_IO_APIC();
if (acpi_ioapic)
io_apic_irqs = ~0; /* all IRQs go through IOAPIC */
else
io_apic_irqs = ~PIC_IRQS; io_apic_irqs = ~PIC_IRQS;
printk("ENABLING IO-APIC IRQs\n"); printk("ENABLING IO-APIC IRQs\n");
/* /*
......
...@@ -929,8 +929,6 @@ void __init mp_override_legacy_irq ( ...@@ -929,8 +929,6 @@ void __init mp_override_legacy_irq (
u32 gsi) u32 gsi)
{ {
struct mpc_config_intsrc intsrc; struct mpc_config_intsrc intsrc;
int i = 0;
int found = 0;
int ioapic = -1; int ioapic = -1;
int pin = -1; int pin = -1;
...@@ -963,23 +961,9 @@ void __init mp_override_legacy_irq ( ...@@ -963,23 +961,9 @@ void __init mp_override_legacy_irq (
(intsrc.mpc_irqflag >> 2) & 3, intsrc.mpc_srcbus, (intsrc.mpc_irqflag >> 2) & 3, intsrc.mpc_srcbus,
intsrc.mpc_srcbusirq, intsrc.mpc_dstapic, intsrc.mpc_dstirq); intsrc.mpc_srcbusirq, intsrc.mpc_dstapic, intsrc.mpc_dstirq);
/*
* If an existing [IOAPIC.PIN -> IRQ] routing entry exists we override it.
* Otherwise create a new entry (e.g. gsi == 2).
*/
for (i = 0; i < mp_irq_entries; i++) {
if ((mp_irqs[i].mpc_srcbus == intsrc.mpc_srcbus)
&& (mp_irqs[i].mpc_srcbusirq == intsrc.mpc_srcbusirq)) {
mp_irqs[i] = intsrc;
found = 1;
break;
}
}
if (!found) {
mp_irqs[mp_irq_entries] = intsrc; mp_irqs[mp_irq_entries] = intsrc;
if (++mp_irq_entries == MAX_IRQ_SOURCES) if (++mp_irq_entries == MAX_IRQ_SOURCES)
panic("Max # of irq sources exceeded!\n"); panic("Max # of irq sources exceeded!\n");
}
return; return;
} }
...@@ -1010,13 +994,20 @@ void __init mp_config_acpi_legacy_irqs (void) ...@@ -1010,13 +994,20 @@ void __init mp_config_acpi_legacy_irqs (void)
intsrc.mpc_dstapic = mp_ioapics[ioapic].mpc_apicid; intsrc.mpc_dstapic = mp_ioapics[ioapic].mpc_apicid;
/* /*
* Use the default configuration for the IRQs 0-15. These may be * Use the default configuration for the IRQs 0-15. Unless
* overriden by (MADT) interrupt source override entries. * overriden by (MADT) interrupt source override entries.
*/ */
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
int idx;
if (i == 2) for (idx = 0; idx < mp_irq_entries; idx++)
continue; /* Don't connect IRQ2 */ if (mp_irqs[idx].mpc_srcbus == MP_ISA_BUS &&
(mp_irqs[idx].mpc_srcbusirq == i ||
mp_irqs[idx].mpc_dstirq == i))
break;
if (idx != mp_irq_entries)
continue; /* IRQ already used */
intsrc.mpc_irqtype = mp_INT; intsrc.mpc_irqtype = mp_INT;
intsrc.mpc_srcbusirq = i; /* Identity mapped */ intsrc.mpc_srcbusirq = i; /* Identity mapped */
......
...@@ -584,8 +584,12 @@ static void __init parse_cmdline_early (char ** cmdline_p) ...@@ -584,8 +584,12 @@ static void __init parse_cmdline_early (char ** cmdline_p)
acpi_ht = 1; acpi_ht = 1;
} }
/* "pci=noacpi" disables ACPI interrupt routing */ /* "pci=noacpi" disable ACPI IRQ routing and PCI scan */
else if (!memcmp(from, "pci=noacpi", 10)) { else if (!memcmp(from, "pci=noacpi", 10)) {
acpi_disable_pci();
}
/* "acpi=noirq" disables ACPI interrupt routing */
else if (!memcmp(from, "acpi=noirq", 10)) {
acpi_noirq_set(); acpi_noirq_set();
} }
...@@ -601,6 +605,9 @@ static void __init parse_cmdline_early (char ** cmdline_p) ...@@ -601,6 +605,9 @@ static void __init parse_cmdline_early (char ** cmdline_p)
else if (!memcmp(from, "acpi_sci=low", 12)) else if (!memcmp(from, "acpi_sci=low", 12))
acpi_sci_flags.polarity = 3; acpi_sci_flags.polarity = 3;
else if (!memcmp(from, "acpi_skip_timer_override", 24))
acpi_skip_timer_override = 1;
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
/* disable IO-APIC */ /* disable IO-APIC */
else if (!memcmp(from, "noapic", 6)) else if (!memcmp(from, "noapic", 6))
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <asm/acpi.h>
#include <asm/arch_hooks.h> #include <asm/arch_hooks.h>
/** /**
...@@ -43,6 +44,7 @@ void __init intr_init_hook(void) ...@@ -43,6 +44,7 @@ void __init intr_init_hook(void)
apic_intr_init(); apic_intr_init();
#endif #endif
if (!acpi_ioapic)
setup_irq(2, &irq2); setup_irq(2, &irq2);
} }
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <asm/acpi.h>
#include <asm/arch_hooks.h> #include <asm/arch_hooks.h>
/** /**
...@@ -17,8 +18,7 @@ ...@@ -17,8 +18,7 @@
* the "ordinary" interrupt call gates. For legacy reasons, the ISA * the "ordinary" interrupt call gates. For legacy reasons, the ISA
* interrupts should be initialised here if the machine emulates a PC * interrupts should be initialised here if the machine emulates a PC
* in any way. * in any way.
**/ **/void __init pre_intr_init_hook(void)
void __init pre_intr_init_hook(void)
{ {
init_ISA_irqs(); init_ISA_irqs();
} }
...@@ -43,6 +43,7 @@ void __init intr_init_hook(void) ...@@ -43,6 +43,7 @@ void __init intr_init_hook(void)
apic_intr_init(); apic_intr_init();
#endif #endif
if (!acpi_ioapic)
setup_irq(2, &irq2); setup_irq(2, &irq2);
} }
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <asm/acpi.h>
#include <asm/arch_hooks.h> #include <asm/arch_hooks.h>
void __init pre_intr_init_hook(void) void __init pre_intr_init_hook(void)
...@@ -24,6 +25,7 @@ void __init intr_init_hook(void) ...@@ -24,6 +25,7 @@ void __init intr_init_hook(void)
smp_intr_init(); smp_intr_init();
#endif #endif
if (!acpi_ioapic)
setup_irq(2, &irq2); setup_irq(2, &irq2);
} }
......
...@@ -453,15 +453,12 @@ static int pirq_bios_set(struct pci_dev *router, struct pci_dev *dev, int pirq, ...@@ -453,15 +453,12 @@ static int pirq_bios_set(struct pci_dev *router, struct pci_dev *dev, int pirq,
static __init int intel_router_probe(struct irq_router *r, struct pci_dev *router, u16 device) static __init int intel_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
{ {
#if 0 /* Let's see what chip this is supposed to be ... */ /* 440GX has a proprietary PIRQ router -- don't use it */
/* We must not touch 440GX even if we have tables. 440GX has
different IRQ routing weirdness */
if ( pci_find_device(PCI_VENDOR_ID_INTEL, if ( pci_find_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_82443GX_0, NULL) || PCI_DEVICE_ID_INTEL_82443GX_0, NULL) ||
pci_find_device(PCI_VENDOR_ID_INTEL, pci_find_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_82443GX_2, NULL)) PCI_DEVICE_ID_INTEL_82443GX_2, NULL))
return 0; return 0;
#endif
switch(device) switch(device)
{ {
......
...@@ -8,7 +8,7 @@ obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \ ...@@ -8,7 +8,7 @@ obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \
ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_x86_64.o \ ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_x86_64.o \
x8664_ksyms.o i387.o syscall.o vsyscall.o \ x8664_ksyms.o i387.o syscall.o vsyscall.o \
setup64.o bootflag.o e820.o reboot.o warmreboot.o setup64.o bootflag.o e820.o reboot.o warmreboot.o
obj-y += mce.o acpi/ obj-y += mce.o
obj-$(CONFIG_MTRR) += ../../i386/kernel/cpu/mtrr/ obj-$(CONFIG_MTRR) += ../../i386/kernel/cpu/mtrr/
obj-$(CONFIG_ACPI_BOOT) += acpi/ obj-$(CONFIG_ACPI_BOOT) += acpi/
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/kernel_stat.h> #include <linux/kernel_stat.h>
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <asm/acpi.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -490,5 +491,6 @@ void __init init_IRQ(void) ...@@ -490,5 +491,6 @@ void __init init_IRQ(void)
*/ */
setup_timer(); setup_timer();
if (!acpi_ioapic)
setup_irq(2, &irq2); setup_irq(2, &irq2);
} }
...@@ -1740,18 +1740,10 @@ static inline void check_timer(void) ...@@ -1740,18 +1740,10 @@ static inline void check_timer(void)
/* /*
* *
* IRQ's that are handled by the old PIC in all cases: * IRQ's that are handled by the PIC in the MPS IOAPIC case.
* - IRQ2 is the cascade IRQ, and cannot be a io-apic IRQ. * - IRQ2 is the cascade IRQ, and cannot be a io-apic IRQ.
* Linux doesn't really care, as it's not actually used * Linux doesn't really care, as it's not actually used
* for any interrupt handling anyway. * for any interrupt handling anyway.
* - There used to be IRQ13 here as well, but all
* MPS-compliant must not use it for FPU coupling and we
* want to use exception 16 anyway. And there are
* systems who connect it to an I/O APIC for other uses.
* Thus we don't mark it special any longer.
*
* Additionally, something is definitely wrong with irq9
* on PIIX4 boards.
*/ */
#define PIC_IRQS (1<<2) #define PIC_IRQS (1<<2)
...@@ -1759,7 +1751,11 @@ void __init setup_IO_APIC(void) ...@@ -1759,7 +1751,11 @@ void __init setup_IO_APIC(void)
{ {
enable_IO_APIC(); enable_IO_APIC();
if (acpi_ioapic)
io_apic_irqs = ~0; /* all IRQs go through IOAPIC */
else
io_apic_irqs = ~PIC_IRQS; io_apic_irqs = ~PIC_IRQS;
printk("ENABLING IO-APIC IRQs\n"); printk("ENABLING IO-APIC IRQs\n");
/* /*
......
...@@ -784,8 +784,6 @@ void __init mp_override_legacy_irq ( ...@@ -784,8 +784,6 @@ void __init mp_override_legacy_irq (
u32 gsi) u32 gsi)
{ {
struct mpc_config_intsrc intsrc; struct mpc_config_intsrc intsrc;
int i = 0;
int found = 0;
int ioapic = -1; int ioapic = -1;
int pin = -1; int pin = -1;
...@@ -818,23 +816,9 @@ void __init mp_override_legacy_irq ( ...@@ -818,23 +816,9 @@ void __init mp_override_legacy_irq (
(intsrc.mpc_irqflag >> 2) & 3, intsrc.mpc_srcbus, (intsrc.mpc_irqflag >> 2) & 3, intsrc.mpc_srcbus,
intsrc.mpc_srcbusirq, intsrc.mpc_dstapic, intsrc.mpc_dstirq); intsrc.mpc_srcbusirq, intsrc.mpc_dstapic, intsrc.mpc_dstirq);
/*
* If an existing [IOAPIC.PIN -> IRQ] routing entry exists we override it.
* Otherwise create a new entry (e.g. gsi == 2).
*/
for (i = 0; i < mp_irq_entries; i++) {
if ((mp_irqs[i].mpc_srcbus == intsrc.mpc_srcbus)
&& (mp_irqs[i].mpc_srcbusirq == intsrc.mpc_srcbusirq)) {
mp_irqs[i] = intsrc;
found = 1;
break;
}
}
if (!found) {
mp_irqs[mp_irq_entries] = intsrc; mp_irqs[mp_irq_entries] = intsrc;
if (++mp_irq_entries == MAX_IRQ_SOURCES) if (++mp_irq_entries == MAX_IRQ_SOURCES)
panic("Max # of irq sources exceeded!\n"); panic("Max # of irq sources exceeded!\n");
}
return; return;
} }
...@@ -865,13 +849,22 @@ void __init mp_config_acpi_legacy_irqs (void) ...@@ -865,13 +849,22 @@ void __init mp_config_acpi_legacy_irqs (void)
intsrc.mpc_dstapic = mp_ioapics[ioapic].mpc_apicid; intsrc.mpc_dstapic = mp_ioapics[ioapic].mpc_apicid;
/* /*
* Use the default configuration for the IRQs 0-15. These may be * Use the default configuration for the IRQs 0-15. Unless
* overridden by (MADT) interrupt source override entries. * overridden by (MADT) interrupt source override entries.
*/ */
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
int idx;
if (i == 2) for (idx = 0; idx < mp_irq_entries; idx++)
continue; /* Don't connect IRQ2 */ if (mp_irqs[idx].mpc_srcbus == MP_ISA_BUS &&
(mp_irqs[idx].mpc_srcbusirq == i ||
mp_irqs[idx].mpc_dstirq == i))
break;
if (idx != mp_irq_entries) {
printk(KERN_DEBUG "ACPI: IRQ%d used by override.\n", i);
continue; /* IRQ already used */
}
intsrc.mpc_irqtype = mp_INT; intsrc.mpc_irqtype = mp_INT;
intsrc.mpc_srcbusirq = i; /* Identity mapped */ intsrc.mpc_srcbusirq = i; /* Identity mapped */
......
...@@ -65,8 +65,8 @@ struct cpuinfo_x86 boot_cpu_data; ...@@ -65,8 +65,8 @@ struct cpuinfo_x86 boot_cpu_data;
unsigned long mmu_cr4_features; unsigned long mmu_cr4_features;
EXPORT_SYMBOL_GPL(mmu_cr4_features); EXPORT_SYMBOL_GPL(mmu_cr4_features);
int acpi_disabled = 0; int acpi_disabled;
EXPORT_SYMBOL(acpi_disabled);
#ifdef CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI_BOOT
extern int __initdata acpi_ht; extern int __initdata acpi_ht;
extern acpi_interrupt_flags acpi_sci_flags; extern acpi_interrupt_flags acpi_sci_flags;
...@@ -242,7 +242,7 @@ static __init void parse_cmdline_early (char ** cmdline_p) ...@@ -242,7 +242,7 @@ static __init void parse_cmdline_early (char ** cmdline_p)
#ifdef CONFIG_ACPI_BOOT #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; disable_acpi();
if (!memcmp(from, "acpi=force", 10)) { if (!memcmp(from, "acpi=force", 10)) {
/* add later when we do DMI horrors: */ /* add later when we do DMI horrors: */
...@@ -256,6 +256,8 @@ static __init void parse_cmdline_early (char ** cmdline_p) ...@@ -256,6 +256,8 @@ static __init void parse_cmdline_early (char ** cmdline_p)
acpi_ht = 1; acpi_ht = 1;
} }
else if (!memcmp(from, "pci=noacpi", 10)) else if (!memcmp(from, "pci=noacpi", 10))
acpi_disable_pci();
else if (!memcmp(from, "acpi=noirq", 10))
acpi_noirq_set(); acpi_noirq_set();
else if (!memcmp(from, "acpi_sci=edge", 13)) else if (!memcmp(from, "acpi_sci=edge", 13))
......
...@@ -215,7 +215,8 @@ acpi_os_predefined_override (const struct acpi_predefined_names *init_val, ...@@ -215,7 +215,8 @@ acpi_os_predefined_override (const struct acpi_predefined_names *init_val,
*new_val = NULL; *new_val = NULL;
if (!memcmp (init_val->name, "_OS_", 4) && strlen(acpi_os_name)) { if (!memcmp (init_val->name, "_OS_", 4) && strlen(acpi_os_name)) {
printk(KERN_INFO PREFIX "Overriding _OS definition\n"); printk(KERN_INFO PREFIX "Overriding _OS definition %s\n",
acpi_os_name);
*new_val = acpi_os_name; *new_val = acpi_os_name;
} }
......
...@@ -793,7 +793,7 @@ static int __init acpi_pci_link_init (void) ...@@ -793,7 +793,7 @@ static int __init acpi_pci_link_init (void)
{ {
ACPI_FUNCTION_TRACE("acpi_pci_link_init"); ACPI_FUNCTION_TRACE("acpi_pci_link_init");
if (acpi_disabled) if (acpi_pci_disabled)
return_VALUE(0); return_VALUE(0);
acpi_link.count = 0; acpi_link.count = 0;
......
...@@ -119,6 +119,7 @@ acpi_pci_root_add ( ...@@ -119,6 +119,7 @@ acpi_pci_root_add (
{ {
int result = 0; int result = 0;
struct acpi_pci_root *root = NULL; struct acpi_pci_root *root = NULL;
struct acpi_pci_root *tmp;
acpi_status status = AE_OK; acpi_status status = AE_OK;
unsigned long value = 0; unsigned long value = 0;
acpi_handle handle = NULL; acpi_handle handle = NULL;
...@@ -186,6 +187,13 @@ acpi_pci_root_add ( ...@@ -186,6 +187,13 @@ acpi_pci_root_add (
goto end; goto end;
} }
/* Some systems have wrong _BBN */
list_for_each_entry(tmp, &acpi_pci_roots, node) {
if ((tmp->id.segment == root->id.segment)
&& (tmp->id.bus == root->id.bus))
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Wrong _BBN value, please reboot and using option 'pci=noacpi'\n"));
}
/* /*
* Device & Function * Device & Function
* ----------------- * -----------------
...@@ -272,7 +280,7 @@ static int __init acpi_pci_root_init (void) ...@@ -272,7 +280,7 @@ static int __init acpi_pci_root_init (void)
{ {
ACPI_FUNCTION_TRACE("acpi_pci_root_init"); ACPI_FUNCTION_TRACE("acpi_pci_root_init");
if (acpi_disabled) if (acpi_pci_disabled)
return_VALUE(0); return_VALUE(0);
/* DEBUG: /* DEBUG:
......
...@@ -109,7 +109,14 @@ extern int acpi_noirq; ...@@ -109,7 +109,14 @@ extern int acpi_noirq;
extern int acpi_strict; extern int acpi_strict;
extern int acpi_disabled; extern int acpi_disabled;
extern int acpi_ht; extern int acpi_ht;
static inline void disable_acpi(void) { acpi_disabled = 1; acpi_ht = 0; } extern int acpi_pci_disabled;
static inline void disable_acpi(void)
{
acpi_disabled = 1;
acpi_ht = 0;
acpi_pci_disabled = 1;
acpi_noirq = 1;
}
/* 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
...@@ -118,6 +125,7 @@ extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); ...@@ -118,6 +125,7 @@ extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq);
#ifdef CONFIG_X86_IO_APIC #ifdef CONFIG_X86_IO_APIC
extern int skip_ioapic_setup; extern int skip_ioapic_setup;
extern int acpi_irq_to_vector(u32 irq); /* deprecated in favor of acpi_gsi_to_irq */ extern int acpi_irq_to_vector(u32 irq); /* deprecated in favor of acpi_gsi_to_irq */
extern int acpi_skip_timer_override;
static inline void disable_ioapic_setup(void) static inline void disable_ioapic_setup(void)
{ {
...@@ -143,9 +151,15 @@ static inline void disable_ioapic_setup(void) ...@@ -143,9 +151,15 @@ static inline void disable_ioapic_setup(void)
#ifdef CONFIG_ACPI_PCI #ifdef CONFIG_ACPI_PCI
static inline void acpi_noirq_set(void) { acpi_noirq = 1; } static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
static inline void acpi_disable_pci(void)
{
acpi_pci_disabled = 1;
acpi_noirq_set();
}
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 void acpi_noirq_set(void) { }
static inline void acpi_disable_pci(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
......
...@@ -89,6 +89,7 @@ ia64_acpi_release_global_lock (unsigned int *lock) ...@@ -89,6 +89,7 @@ ia64_acpi_release_global_lock (unsigned int *lock)
((Acq) = ia64_acpi_release_global_lock((unsigned int *) GLptr)) ((Acq) = ia64_acpi_release_global_lock((unsigned int *) GLptr))
#define acpi_disabled 0 /* ACPI always enabled on IA64 */ #define acpi_disabled 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_strict 1 /* no ACPI spec workarounds on IA64 */
static inline void disable_acpi(void) { } static inline void disable_acpi(void) { }
......
...@@ -106,8 +106,15 @@ extern int acpi_ioapic; ...@@ -106,8 +106,15 @@ extern int acpi_ioapic;
extern int acpi_noirq; extern int acpi_noirq;
extern int acpi_strict; extern int acpi_strict;
extern int acpi_disabled; extern int acpi_disabled;
extern int acpi_pci_disabled;
extern int acpi_ht; extern int acpi_ht;
static inline void disable_acpi(void) { acpi_disabled = 1; acpi_ht = 0; } static inline void disable_acpi(void)
{
acpi_disabled = 1;
acpi_ht = 0;
acpi_pci_disabled = 1;
acpi_noirq = 1;
}
/* 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
...@@ -121,9 +128,15 @@ extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); ...@@ -121,9 +128,15 @@ extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq);
#ifdef CONFIG_ACPI_PCI #ifdef CONFIG_ACPI_PCI
static inline void acpi_noirq_set(void) { acpi_noirq = 1; } static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
static inline void acpi_disable_pci(void)
{
acpi_pci_disabled = 1;
acpi_noirq_set();
}
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 void acpi_noirq_set(void) { }
static inline void acpi_disable_pci(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
...@@ -144,6 +157,7 @@ extern void acpi_reserve_bootmem(void); ...@@ -144,6 +157,7 @@ extern void acpi_reserve_bootmem(void);
#define boot_cpu_physical_apicid boot_cpu_id #define boot_cpu_physical_apicid boot_cpu_id
extern int acpi_disabled; extern int acpi_disabled;
extern int acpi_pci_disabled;
#define dmi_broken (0) #define dmi_broken (0)
#define BROKEN_ACPI_Sx 0x0001 #define BROKEN_ACPI_Sx 0x0001
......
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