]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ACPI: RISC-V: Implement function to add implicit dependencies
authorSunil V L <sunilvl@ventanamicro.com>
Mon, 12 Aug 2024 00:59:24 +0000 (06:29 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 27 Aug 2024 13:48:35 +0000 (15:48 +0200)
commit1b173cc4bfcdcf4a49927952ba3a445c5b293723
treeb87c797ae49cb0acd0ec7e9658951822dbb5e90b
parente77b8dc02a1ca227e84c61e6af085d350e3b3611
ACPI: RISC-V: Implement function to add implicit dependencies

RISC-V interrupt controllers for wired interrupts are platform devices
and hence their driver will be probed late. Also, APLIC which is one
such interrupt controller can not be probed early since it needs MSI
services. This needs a probing order between the interrupt controller
driver and the device drivers.

_DEP is typically used to indicate such dependencies. However, the
dependency may be already available like GSI mapping. Hence, instead of
an explicit _DEP, architecture can find the implicit dependencies and
add to the dependency list.

For RISC-V, add the dependencies for below use cases.

1) For devices which has IRQ resource, find out the interrupt controller
   using GSI number map and add the dependency.

2) For PCI host bridges:
        a) If _PRT indicate PCI link devices, add dependency on the link
           device.
        b) If _PRT indicates GSI, find out the interrupt controller
           using GSI number map and add the dependency.

Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Tested-by: Björn Töpel <bjorn@rivosinc.com>
Link: https://patch.msgid.link/20240812005929.113499-13-sunilvl@ventanamicro.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/riscv/irq.c