Re: [PATCH] pci: layerscape: fix pci_iommu_extra hotplug

Neil Armstrong <[email protected]> Mon, 3 Aug 2026 10:05:33 +0200
Newsgroups gmane.comp.boot-loaders.u-boot
Organization Linaro
Message-ID <[email protected]>
On 7/30/26 00:21, Vincent Jardin wrote:
> We can have many pci hotplug groups, each introduced
> by a "pci@<addr>" token such as,
> 
>    pci_iommu_extra=pci@0x3600000,1.0.0,hp,pci@0x3700000,1.0.0,hp,
>                    pci@0x3800000,1.0.0,hp,pci@0x3900000,1.0.0,hp
> 
> Without this fix, we have the error:
>    Added iommu map for hotplug 1.0.0
>    ERROR: invalid action in extra iommu entry
>    ERROR: invalid action in extra iommu entry
>    ERROR: invalid action in extra iommu entry
> 
> Fixes: 2a5bbb13cc39 ("pci: layerscape: add a way of specifying additional iommu mappings")
> Signed-off-by: Vincent Jardin <[email protected]>
> 
> ---
> 
>   drivers/pci/pcie_layerscape_fixup.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/pci/pcie_layerscape_fixup.c b/drivers/pci/pcie_layerscape_fixup.c
> index 97c38c0bfa7..5299aee63db 100644
> --- a/drivers/pci/pcie_layerscape_fixup.c
> +++ b/drivers/pci/pcie_layerscape_fixup.c
> @@ -319,6 +319,11 @@ static struct extra_iommu_entry *get_extra_iommu_ents(void *blob,
>   			/* Hot-plug entry */
>   			entries[i].action = EXTRA_IOMMU_ENTRY_HOTPLUG;
>   			p += 2;
> +			/* Skip the comma separator so it check the
> +			 * next "pci@" group.
> +			 */
> +			if (*p == ',')
> +				p++;
>   		} else if (!strncmp(p, "vfs", 3) ||
>   			   !strncmp(p, "noari_vfs", 9)) {
>   			/* VFs or VFs with ARI disabled entry */
> ---
> base-commit: 616c3d79f01cf9204e38738857c4647a730dcb3b
> branch: for-upstream/pci-layerscape-iommu-extra-v1
> 

Reviewed-by: Neil Armstrong <[email protected]>

Thanks,
Neil