[PATCH] x86/platform, acpi: Statically assign IRQ numbers in ACPI hardware reduced mode

From: Aubrey Li
Date: Mon Mar 30 2015 - 11:50:09 EST


We should be able to dynamically assign IRQ number on the platform in ACPI
Hardware-reduced mode, but on the Bay Trail-T(ASUS-T100) platform, there is
a RTC device still using the legacy hardcoded IRQ8, which could cause the
following error:

7486341a98f: genirq: Flags mismatch irq 8. 00000080 (mmc0) vs. 00000000 (rtc0)

So we want to statically assign IRQ numbers in ACPI hardware reduced mode to
fix this error

Signed-off-by: Li Aubrey <aubrey.li@xxxxxxxxxxxxxxx>
Cc: Alan Cox <alan@xxxxxxxxxxxxxxx>
Cc: Len Brown <len.brown@xxxxxxxxx>
Cc: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
Cc: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
---
arch/x86/kernel/acpi/boot.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 803b684..4cd0761 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -460,8 +460,12 @@ acpi_parse_ioapic(struct acpi_subtable_header * header, const unsigned long end)

acpi_table_print_madt_entry(header);

- /* Statically assign IRQ numbers for IOAPICs hosting legacy IRQs */
- if (ioapic->global_irq_base < nr_legacy_irqs())
+ /*
+ * Statically assign IRQ numbers for IOAPICs hosting legacy IRQs,
+ * Or for the platform in Hardware-reduced ACPI model
+ */
+ if (ioapic->global_irq_base < nr_legacy_irqs() ||
+ acpi_gbl_reduced_hardware)
cfg.type = IOAPIC_DOMAIN_LEGACY;

mp_register_ioapic(ioapic->id, ioapic->address, ioapic->global_irq_base,
--
1.9.1


--------------010502000000090704050108--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/