diff options
| author | Sunil V L <[email protected]> | 2024-08-12 00:59:14 +0000 |
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2024-08-27 13:48:35 +0000 |
| commit | a9b8f337ea4eb66e4980f90bb73e8786e56cacfd (patch) | |
| tree | ecbcdfab862c7a5cc3ce001cbc09a0649ca34168 /drivers/acpi/scan.c | |
| parent | arm64: PCI: Migrate ACPI related functions to pci-acpi.c (diff) | |
| download | kernel-a9b8f337ea4eb66e4980f90bb73e8786e56cacfd.tar.gz kernel-a9b8f337ea4eb66e4980f90bb73e8786e56cacfd.zip | |
ACPI: scan: Add a weak arch_sort_irqchip_probe() to order the IRQCHIP probe
Unlike OF framework, the irqchip probe using IRQCHIP_ACPI_DECLARE has no
order defined. Depending on the Makefile is not a good idea. So,
usually it is worked around by mandating only root interrupt controller
probed using IRQCHIP_ACPI_DECLARE and other interrupt controllers are
probed via cascade mechanism.
However, this is also not a clean solution because if there are multiple
root controllers (ex: RINTC in RISC-V which is per CPU) which need to be
probed first, then the cascade will happen for every root controller.
So, introduce an architecture specific weak function
arch_sort_irqchip_probe() to order the probing of the interrupt
controllers which can be implemented by different architectures as per
their interrupt controller hierarchy.
Signed-off-by: Sunil V L <[email protected]>
Tested-by: Björn Töpel <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'drivers/acpi/scan.c')
| -rw-r--r-- | drivers/acpi/scan.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 22ae7829a915..607bbb8b90da 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -2757,6 +2757,8 @@ static int __init acpi_match_madt(union acpi_subtable_headers *header, return 0; } +void __weak arch_sort_irqchip_probe(struct acpi_probe_entry *ap_head, int nr) { } + int __init __acpi_probe_device_table(struct acpi_probe_entry *ap_head, int nr) { int count = 0; @@ -2765,6 +2767,7 @@ int __init __acpi_probe_device_table(struct acpi_probe_entry *ap_head, int nr) return 0; mutex_lock(&acpi_probe_mutex); + arch_sort_irqchip_probe(ap_head, nr); for (ape = ap_head; nr; ape++, nr--) { if (ACPI_COMPARE_NAMESEG(ACPI_SIG_MADT, ape->id)) { acpi_probe_count = 0; |
