Page MenuHomeFreeBSD

acpica: rework INTRNG interrupt mapping
ClosedPublic

Authored by jchandra on Oct 31 2018, 11:52 PM.

Details

Summary

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

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jchandra created this revision.Oct 31 2018, 11:52 PM
jchandra edited the summary of this revision. (Show Details)Oct 31 2018, 11:52 PM
andrew accepted this revision.Nov 15 2018, 5:56 PM
This revision is now accepted and ready to land.Nov 15 2018, 5:56 PM
This revision was automatically updated to reflect the committed changes.