On Thu, Jul 03, 2025 at 04:24:18PM +0530, Sunil V L wrote: > On Wed, Jul 02, 2025 at 03:28:45PM +0300, Andy Shevchenko wrote: > > On Wed, Jul 02, 2025 at 10:43:42AM +0530, Anup Patel wrote: ... > > > - if (dev_of_node(dev)) > > > + if (is_of_node(fwnode)) { > > > of_msi_configure(dev, dev_of_node(dev)); > > > + } else if (is_acpi_device_node(fwnode)) { > > > + msi_domain = irq_find_matching_fwnode(imsic_acpi_get_fwnode(dev), > > > + DOMAIN_BUS_PLATFORM_MSI); > > > + dev_set_msi_domain(dev, msi_domain); > > > + } > > > > Actually you don't need to have the if-else-if if I am not mistaken. > > The OF does almost the same as it's done in the second branch for ACPI case. > > How many MSI parents this may have? > > > OF already has a well defined interface to configure the MSI domain. The > mechanisms existing today are different for DT vs ACPI to find out the > fwnode of the MSI controller. So, it is done differently. I don't see how. The only difference I see is that OF iterates over all listed parents, if any, ACPI tries only one. So, perhaps it's a time to have a common API somewhere for this to be agnostic? Something like fwnode_msi_configure() in somewhere of IRQ MSI core? > In RISC-V case at least, there will be only one MSI parent. -- With Best Regards, Andy Shevchenko