pci: layerscape: fix pci_iommu_extra hotplug
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: 2a5bbb13cc ("pci: layerscape: add a way of specifying additional iommu mappings")
Signed-off-by: Vincent Jardin <vjardin@free.fr>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user