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

John Garry john.garry at arm.com
Thu Nov 19 02:55:41 PST 2026


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;
> +




More information about the linux-arm-kernel mailing list