History

irqchip/gic-v5: Enable GICv5 IWB ACPI probe ordering detection

Register an ACPI hook in the ACPI interrupt management code for GICv5 to retrieve the ACPI interrupt controller handle (if any) of the controller handling a specific GSI, by updating the acpi_set_irq_model() call with the gic_v5_get_gsi_handle() function pointer parameter. gicv5_get_gsi_handle() allows ACPI core to detect the ACPI handle of the controller that manages a specific GSI interrupt. Update the IWB driver to clear device dependencies in ACPI core once the IWB driver has probed.

Lorenzo Pieralisi committed 4 months ago

Commit d2aa7b11 parent 5a646112 files · +12 −1Browse files

Unified · Split

2 files
  1. drivers/irqchip/irq-gic-v5-iwb.c +2 −0
  2. drivers/irqchip/irq-gic-v5.c +10 −1
drivers/irqchip/irq-gic-v5-iwb.c+2−0
@@ -269,6 +269,8 @@ static int gicv5_iwb_device_probe(struct platform_device *pdev) · 268 unmodified lines
269269 if (IS_ERR(iwb_node))
270270 return PTR_ERR(iwb_node);
271271
272+ acpi_device_clear_deps(&pdev->dev);
273+
272274 return 0;
273275 }
274276
drivers/irqchip/irq-gic-v5.c+10−1
@@ -1231,6 +1231,14 @@ static struct fwnode_handle *gic_v5_get_gsi_domain_id(u32 gsi) · 1230 unmodified lines
12311231 return gsi_domain_handle;
12321232 }
12331233
1234+static acpi_handle gic_v5_get_gsi_handle(u32 gsi)
1235+{
1236+ if (FIELD_GET(GICV5_GSI_IC_TYPE, gsi) == GICV5_GSI_IWB_TYPE)
1237+ return iort_iwb_handle(FIELD_GET(GICV5_GSI_IWB_FRAME_ID, gsi));
1238+
1239+ return NULL;
1240+}
1241+
12341242 static int __init gic_acpi_init(union acpi_subtable_headers *header, const unsigned long end)
12351243 {
12361244 struct acpi_madt_gicv5_irs *irs = (struct acpi_madt_gicv5_irs *)header;
@@ -1251,7 +1259,8 @@ static int __init gic_acpi_init(union acpi_subtable_headers *header, const unsig · 14 unmodified lines
12511259 if (ret)
12521260 goto out_irs;
12531261
1254− acpi_set_irq_model(ACPI_IRQ_MODEL_GIC_V5, gic_v5_get_gsi_domain_id, NULL);
1262+ acpi_set_irq_model(ACPI_IRQ_MODEL_GIC_V5, gic_v5_get_gsi_domain_id,
1263+ gic_v5_get_gsi_handle);
12551264
12561265 return 0;
12571266

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t