[PATCH v13 04/12] iommu/arm-smmu-v3: Pack the MSI vectors of the used sources

Nicolin Chen nicolinc at nvidia.com
Thu Nov 19 08:50:57 PST 2026


On Thu, Nov 19, 2026 at 10:55:41AM +0000, John Garry wrote:
> On 11/17/26 19:21, Nicolin Chen wrote:
> > arm_smmu_setup_msis() skips the PRIQ vector by decreasing nvec, which only
> > works since PRIQ_MSI_INDEX is the last index. A subsequent change will make
> > the EVTQ optional for kdump, whose index is 0, so that trick won't work.
> > 
> > Pack the vectors of the used sources instead, and record the source of each
> > vector in a new msi_map, for arm_smmu_write_msi_msg() to find the register
> > set, regardless of the sources in use.
> > 
> > No functional change intended.
> > 
> > Suggested-by: Jason Gunthorpe<jgg at nvidia.com>
> > Signed-off-by: Nicolin Chen<nicolinc at nvidia.com>
> 
> looks ok, so FWIW:
> 
> Reviewed-by: John Garry <john.garry at arm.com>
> > +	/* Map each vector back to its source for arm_smmu_write_msi_msg() */
> > +	for (i = 0; i < ARM_SMMU_MAX_MSIS; i++)
> 
> Some might prefer using brace when body statement(s) covers > 1 line
> 
> > +		if (vec[i] < nvec)> +			smmu->msi_map[vec[i]] = i;
> > +

I don't intend to respin the whole series for this nit.

But, if there is a more solid reason for a respin, I'll fold it in.

Nicolin



More information about the linux-arm-kernel mailing list