[PATCH] iommu/riscv: prefer WSI on IGS=BOTH when wired IRQs are described

Robin Murphy robin.murphy at arm.com
Wed May 20 09:13:57 PDT 2026


On 2026-05-20 5:03 pm, Andrew Jones wrote:
> On Wed, May 20, 2026 at 09:44:16PM +0800, fangyu.yu at linux.alibaba.com wrote:
> ...
>>> (As a side note, is there a reason this is calling of_msi_configure() on
>>> a platform device when of_platform_device_create_pdata() will have done
>>> that already?)
>>
>> Good catch, agreed.
>>
> 
> This is here for a device creation order issue. We have similar patterns
> elsewhere, e.g. drivers/irqchip/irq-riscv-rpmi-sysmsi.c:268. When the
> device is created the MSI controller may not yet have been probed, so
> msi_domain will be NULL. The of_msi_configure() here ensures it gets a
> second chance. Anup says he has a device driver framework solution to
> avoid this pattern that he intends to post soon. I'll clean this up
> after that.

Ah, that sounds like something somewhere between of_msi_configure() and 
platform_device_msi_init_and_alloc_irqs() needs to be able to return an 
EPROBE_DEFER if a parent is specified but not ready yet, similar to 
regular of_irq_get(). I guess this hasn't been noticed much yet since 
most MSI controllers run off early initcalls rather than being regular 
driver model drivers - OK, fair enough for now :)

Cheers,
Robin.



More information about the linux-riscv mailing list