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
269 if (IS_ERR(iwb_node))269 if (IS_ERR(iwb_node))
270 return PTR_ERR(iwb_node);270 return PTR_ERR(iwb_node);
271 271
272 acpi_device_clear_deps(&pdev->dev);
273
272 return 0;274 return 0;
273}275}
274 276
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
1231 return gsi_domain_handle;1231 return gsi_domain_handle;
1232}1232}
1233 1233
1234static 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
1234static int __init gic_acpi_init(union acpi_subtable_headers *header, const unsigned long end)1242static int __init gic_acpi_init(union acpi_subtable_headers *header, const unsigned long end)
1235{1243{
1236 struct acpi_madt_gicv5_irs *irs = (struct acpi_madt_gicv5_irs *)header;1244 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
1251 if (ret)1259 if (ret)
1252 goto out_irs;1260 goto out_irs;
1253 1261
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);
1255 1264
1256 return 0;1265 return 0;
1257 1266

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