Page MenuHomeFreeBSD

acpica: rework INTRNG interrupt mapping

Authored by jchandra on Oct 31 2018, 11:52 PM.
Referenced Files
F55863406: D17790.diff
Sat, Feb 4, 7:50 PM
Unknown Object (File)
Tue, Jan 17, 8:41 AM
Unknown Object (File)
Dec 28 2022, 6:55 PM



On arm64 (where INTRNG is enabled), the interrupts have to be mapped with ACPI_BUS_MAP_INTR() before adding them as resources to devices.

The earlier code did the mapping before calling acpi_set_resource(), which bypassed code that checked for PCI link interrupts.

To fix this, move the call to map interrupts into acpi_set_resource() and that requires additional work to lookup interrupt properties.
The changes here are to:

  • extend acpi_lookup_irq_handler() to lookup an irq in the ACPI resources
  • create a helper function acpi_map_intr() which uses the updated acpi_lookup_irq_handler() to look up an irq, and then map it with ACPI_BUS_MAP_INTR()
  • use acpi_map_intr() in acpi_pcib_route_interrupt() to map pci link interrupts.

With these changes, we can drop the ifdefs in acpi_resource.c, and we can also drop the call for mapping interrupts in generic_timer.c

Diff Detail

rS FreeBSD src repository - subversion
Lint Not Applicable
Tests Not Applicable