PCI: iproc: Fix multi-MSI base vector number allocation
authorSandor Bodo-Merle <sbodomerle@gmail.com>
Tue, 22 Jun 2021 15:26:29 +0000 (17:26 +0200)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 22 Jun 2021 15:43:42 +0000 (16:43 +0100)
commite673d697b9a234fc3544ac240e173cef8c82b349
treeb3eb420b786d42afea08f31fb1cd2b12299cddd5
parent6efb943b8616ec53a5e444193dccf1af9ad627b5
PCI: iproc: Fix multi-MSI base vector number allocation

Commit fc54bae28818 ("PCI: iproc: Allow allocation of multiple MSIs")
introduced multi-MSI support with a broken allocation mechanism (it failed
to reserve the proper number of bits from the inner domain).  Natural
alignment of the base vector number was also not guaranteed.

Link: https://lore.kernel.org/r/20210622152630.40842-1-sbodomerle@gmail.com
Fixes: fc54bae28818 ("PCI: iproc: Allow allocation of multiple MSIs")
Reported-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Sandor Bodo-Merle <sbodomerle@gmail.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Acked-by: Pali Rohár <pali@kernel.org>
Acked-by: Ray Jui <ray.jui@broadcom.com>
drivers/pci/controller/pcie-iproc-msi.c