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

From: Nicolin Chen

Date: Tue Nov 17 2026 - 11:19:16 EST


On Tue, Nov 17, 2026 at 02:30:20PM +0000, John Garry wrote:
> On 11/16/26 18:57, Nicolin Chen wrote:
> > > > @@ -993,6 +1000,8 @@ struct arm_smmu_device {
> > > > int gerr_irq;
> > > > int combined_irq;
> > > > + /* MSI vector index to enum arm_smmu_msi_index */
> > > > + u8 msi_map[ARM_SMMU_MAX_MSIS];
> > > should this be an array of enum arm_smmu_msi_index, as in
> > > arm_smmu_setup_msi_vector() we write a enum arm_smmu_msi_index? I am
> > > assuming that is why enum arm_smmu_msi_index was relocated.
> > u8 is optimal in cost of memory; ARM_SMMU_MAX_MSIS is needed here.
>
> Since ARM_SMMU_MAX_MSIS would be 3, I don't think that the memory saving
> would be so large. And since the next member in arm_smmu_device - oas - is
> unsigned long, I'm guessing that a gap is formed anyway.

The comment above the u8 is already quite clear. Not sure about
the point of pushing here. Fine. I'll change it in v13.

Nicolin