]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r340598:
authorJayachandran C. <jchandra@FreeBSD.org>
Wed, 18 Sep 2019 07:09:16 +0000 (07:09 +0000)
committerJayachandran C. <jchandra@FreeBSD.org>
Wed, 18 Sep 2019 07:09:16 +0000 (07:09 +0000)
commit8e0e405509b3c6fc60a570e4b1ea6509597eb6d6
treeef3472e76735c35cb973ca32f91f008dcc4ca6bc
parent304f8a3e1372d305e7d04eed23d249c3008f3185
MFC r340598:

acpica: rework INTRNG interrupts

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

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D17790
sys/arm/arm/generic_timer.c
sys/dev/acpica/acpi.c
sys/dev/acpica/acpi_pcib.c
sys/dev/acpica/acpi_resource.c
sys/dev/acpica/acpivar.h