On Tue, Feb 11, 2025 at 05:43:21PM -0800, Roman Kisel wrote:
+ * function called later.
The rest of this file fits in 80 columns; please wrap this to match.
+ */
+ if (!domain)
+ WARN_ONCE(1, "No interrupt-parent found, check the DeviceTree data.\n");
Is there a way to include a hint about what specific part of the
devicetree to look at, e.g., the node that lacks a parent?
+ * the messy ifdef below.
Add a blank line if you intend a new paragraph here. Otherwise, wrap
to fill 78 columns or so.
+ * There is apparently no such default in the OF subsystem, and
+ * `hv_pci_of_irq_domain_parent` finds the parent IRQ domain that
+ * points to the GIC as well.
And here.
+ * None of these two cases reaches for the MSI parent domain.
I don't know what "reaches for the MSI parent domain" means. Neither
"searches for"?
*/
- hv_msi_gic_irq_domain = acpi_irq_create_hierarchy(0, HV_PCI_MSI_SPI_NR,
- fn, &hv_pci_domain_ops,
- chip_data);
+#ifdef CONFIG_ACPI
+ if (!acpi_disabled)
+ hv_msi_gic_irq_domain = acpi_irq_create_hierarchy(0, HV_PCI_MSI_SPI_NR,
+ fn, &hv_pci_domain_ops,
+ chip_data);
+#endif
+#if defined(CONFIG_OF)
+ if (!hv_msi_gic_irq_domain)
+ hv_msi_gic_irq_domain = irq_domain_create_hierarchy(
+ hv_pci_of_irq_domain_parent(), 0, HV_PCI_MSI_SPI_NR,
+ fn, &hv_pci_domain_ops,
+ chip_data);
+#endif
I don't know if acpi_irq_create_hierarchy() is helping or hurting
here. It obscures the fact that the only difference is the first
argument to irq_domain_create_hierarchy(). If we could open-code or
have a helper to figure out that irq_domain "parent" argument for the
ACPI case, then we'd only have one call of
irq_domain_create_hierarchy() here and it seems like it might be
simpler.