ACPI: Do not touch legacy irq in Hardware Reduced ACPI mode
PATCH 1/1 ACPI: Do not touch legacy irq in Hardware Reduced ACPI mode
Quoted 1 line
From
3a60407725e92bbb05e4d723863fe4bd810bdc5eMon Sep 17 00:00:00 2001
From: Zhang Rui <[email protected]>
Date: Tue, 25 Sep 2012 09:31:08 +0800
Subject: [PATCH] Do not touch legacy irq in Hardware Reduced ACPI mode
In Hardware Reduced ACPI mode, there is neither SCI nor legacy IRQ, thus we should not touch any of these.
--- arch/x86/kernel/acpi/boot.c | 11 ++++++++++- drivers/acpi/pci_link.c | 3 +++ 2 files changed, 13 insertions(+), 1 deletions(-)
arch/x86/kernel/acpi/boot.c +10 -1
@@ -373,6 +373,10 @@ acpi_parse_ioapic(struct acpi_subtable_header * header, const unsigned long end)*/ static void __init acpi_sci_ioapic_setup (u8 bus_irq,u16 polarity,u16 trigger,u32 gsi) { +/* No SCI in Hardware Reduced Mode */ +if (acpi_gbl_reduced_hardware) +return ; +if (trigger ==0 )/* compatible SCI trigger is level */ trigger =3 ;
@@ -992,6 +996,10 @@ void __init mp_config_acpi_legacy_irqs(void)int i;struct mpc_intsrc mp_irq; +/* No legacy IRQ in Hardware Reduced Mode */ +if (acpi_gbl_reduced_hardware) +return ; +#ifdef CONFIG_EISA /* * Fabricate the legacy ISA bus (bus #31).
@@ -1109,7 +1117,8 @@ int mp_register_gsi(struct device *dev, u32 gsi, int trigger, int polarity)return gsi;/* Don't set up the ACPI SCI because it's already set up */ -if (acpi_gbl_FADT.sci_interrupt == gsi) +if (!acpi_gbl_reduced_hardware && + acpi_gbl_FADT.sci_interrupt == gsi)return gsi; ioapic =mp_find_ioapic (gsi);
drivers/acpi/pci_link.c +3 -0
@@ -481,6 +481,9 @@ int __init acpi_irq_penalty_init(void)struct acpi_pci_link *link;int i; +/* No irq penalty in Hardware Reduced Mode */ +if (acpi_gbl_reduced_hardware) +return 0 ;/* * Update penalties to facilitate IRQ balancing. */
Signature · 1 line
1.7.7.6
Len Brown
reviewerdrivers/acpi/pci_link.c int __init acpi_irq_penalty_init(void) · line 489
Quoted 10 lines
drivers/acpi/pci_link.c +3
-0@@ -481,6 +481,9 @@ int __init acpi_irq_penalty_init(void)struct acpi_pci_link *link;int i; +/* No irq penalty in Hardware Reduced Mode */ +if (acpi_gbl_reduced_hardware) +return 0 ;/* * Update penalties to facilitate IRQ balancing. */
Although there is no PIC in hw-reduced mode,
and even though "PCI Interrupt Link Devices" are typically used to describe PIC interrupts in IOAPIC mode,
I think that Links may still be used in straight IOAPIC mode -- at least in theory.
So it isn't clear that we can categorically disable Link support in HW-reduced mode.
thanks,
Len Brown, Intel Open Source Technology Center