Skip to content

Commit

Permalink
x86/platform, acpi: Statically assign IRQ numbers in ACPI, hardware r…
Browse files Browse the repository at this point in the history
…educed mode

We have to be conservative to dynamically assign IRQ number on the platform
in ACPI Hardware-reduced mode. 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 if RTC is configured:

7486341: 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, this also matches with the original IRQ assignment policy.

Signed-off-by: Li Aubrey <aubrey.li@linux.intel.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: youling257 <youling257@gmail.com>
  • Loading branch information
Li, Aubrey authored and youling257 committed Nov 28, 2017
1 parent 9665619 commit c899b82
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions arch/x86/kernel/acpi/boot.c
Expand Up @@ -456,8 +456,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,
Expand Down

0 comments on commit c899b82

Please sign in to comment.