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

John Garry john.garry at arm.com
Tue Nov 17 06:30:20 PST 2026


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.

Thanks,
John



More information about the linux-arm-kernel mailing list