]> git.baikalelectronics.ru Git - kernel.git/commit
irqchip/gic-v3-its-platform-msi: Fix msi-parent parsing loop
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Thu, 10 Aug 2017 14:41:17 +0000 (15:41 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Thu, 10 Aug 2017 15:26:54 +0000 (16:26 +0100)
commit09b447d6aa6bf168df4d49e5fad7357d2a357889
tree6233ae23329c68ca5ed833231450face79ab47e5
parent2f59b9f8e67b3c19766ff0fac1372c457c7c286a
irqchip/gic-v3-its-platform-msi: Fix msi-parent parsing loop

While parsing the msi-parent property to chase up the IRQ domain
a given device belongs to, the index into the msi-parent tuple should
be incremented to ensure all properties entries are taken into account.

Current code missed the index update so the parsing loop does not work
in case multiple msi-parent phandles are present and may turn into
an infinite loop in of_pmsi_get_dev_id() if phandle at index 0 does
not correspond to the domain we are actually looking-up.

Fix the code by updating the phandle index at each iteration in
of_pmsi_get_dev_id().

Fixes: 8a837ed688b9 ("irqchip/gic-v3-its: Parse new version of msi-parent property")
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
drivers/irqchip/irq-gic-v3-its-platform-msi.c