[PATCH 4/7] iommu/arm-smmu-v3-test: Fix arm_smmu_v3_test_debug_print_used_bits()

Nicolin Chen nicolinc at nvidia.com
Fri Aug 28 09:12:49 PDT 2026


On Fri, Aug 28, 2026 at 12:53:39PM +0000, Mostafa Saleh wrote:
> arm_smmu_v3_test_debug_print_used_bits() hardcodes arm_smmu_get_ste_used()
> instead of using the provided writer->ops->get_used() callback.
> This caused Context Descriptors to be incorrectly parsed as STEs.
> 
> Fixes: 56e1a4cc2588 ("iommu/arm-smmu-v3: Add unit tests for arm_smmu_write_entry")
> Reported-by: Sashiko <>
> Signed-off-by: Mostafa Saleh <smostafa at google.com>
> ---
>  drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c
> index add671363c82..eae08d4d77ec 100644
> --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c
> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-test.c
> @@ -125,8 +125,8 @@ arm_smmu_v3_test_debug_print_used_bits(struct arm_smmu_entry_writer *writer,
>  {
>  	__le64 used_bits[NUM_ENTRY_QWORDS] = {};
>  
> -	arm_smmu_get_ste_used(ste, used_bits);
> -	pr_debug("STE used bits: ");
> +	writer->ops->get_used(ste, used_bits);
> +	pr_debug("Entry used bits: ");

Nit: the name of the 2nd function parameter is still "ste" being
used at writer->ops->get_used. Maybe it should change to "ent"?

Otherwise,

Reviewed-by: Nicolin Chen <nicolinc at nvidia.com>



More information about the linux-arm-kernel mailing list