Re: [PATCH v12 04/12] iommu/arm-smmu-v3: Pack the MSI vectors of the used sources
From: John Garry
Date: Tue Nov 17 2026 - 09:31:08 EST
On 11/16/26 18:57, Nicolin Chen wrote:
u8 is optimal in cost of memory; ARM_SMMU_MAX_MSIS is needed here.@@ -993,6 +1000,8 @@ struct arm_smmu_device {should this be an array of enum arm_smmu_msi_index, as in
int gerr_irq;
int combined_irq;
+ /* MSI vector index to enum arm_smmu_msi_index */
+ u8 msi_map[ARM_SMMU_MAX_MSIS];
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.
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.
Thanks,
John