mirror of
https://github.com/torvalds/linux.git
synced 2025-11-03 10:10:33 +02:00
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 <sunilvl@ventanamicro.com> Tested-by: Björn Töpel <bjorn@rivosinc.com> Link: https://patch.msgid.link/20240812005929.113499-3-sunilvl@ventanamicro.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
789befdfa3
commit
a9b8f337ea
2 changed files with 5 additions and 0 deletions
|
|
@ -2757,6 +2757,8 @@ static int __init acpi_match_madt(union acpi_subtable_headers *header,
|
||||||
return 0;
|
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 __init __acpi_probe_device_table(struct acpi_probe_entry *ap_head, int nr)
|
||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
@ -2765,6 +2767,7 @@ int __init __acpi_probe_device_table(struct acpi_probe_entry *ap_head, int nr)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
mutex_lock(&acpi_probe_mutex);
|
mutex_lock(&acpi_probe_mutex);
|
||||||
|
arch_sort_irqchip_probe(ap_head, nr);
|
||||||
for (ape = ap_head; nr; ape++, nr--) {
|
for (ape = ap_head; nr; ape++, nr--) {
|
||||||
if (ACPI_COMPARE_NAMESEG(ACPI_SIG_MADT, ape->id)) {
|
if (ACPI_COMPARE_NAMESEG(ACPI_SIG_MADT, ape->id)) {
|
||||||
acpi_probe_count = 0;
|
acpi_probe_count = 0;
|
||||||
|
|
|
||||||
|
|
@ -1343,6 +1343,8 @@ struct acpi_probe_entry {
|
||||||
kernel_ulong_t driver_data;
|
kernel_ulong_t driver_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void arch_sort_irqchip_probe(struct acpi_probe_entry *ap_head, int nr);
|
||||||
|
|
||||||
#define ACPI_DECLARE_PROBE_ENTRY(table, name, table_id, subtable, \
|
#define ACPI_DECLARE_PROBE_ENTRY(table, name, table_id, subtable, \
|
||||||
valid, data, fn) \
|
valid, data, fn) \
|
||||||
static const struct acpi_probe_entry __acpi_probe_##name \
|
static const struct acpi_probe_entry __acpi_probe_##name \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue