]> git.ipfire.org Git - thirdparty/linux.git/commit
iommu/arm-smmu-v3: Directly encode CMDQ_OP_ATC_INV
authorJason Gunthorpe <jgg@nvidia.com>
Wed, 13 May 2026 23:57:46 +0000 (20:57 -0300)
committerWill Deacon <will@kernel.org>
Tue, 19 May 2026 14:06:12 +0000 (15:06 +0100)
commit2eedb906f9c605aa789758f9aa172a930c88944f
tree832736789201305d4cb1980fcdf872898b32c5d1
parent6e771be45e8a49ae3099607850f3965cfcf952e4
iommu/arm-smmu-v3: Directly encode CMDQ_OP_ATC_INV

Add a new command make function and convert all the places using
ATC_INV.

Split out full invalidation to directly make the cmd instead of
overloading size=0 to mean full invalidation.

In section "3.9.1 ATS Interface" of F.b the specification says:

  When the SMMU returns an ATS Translation Completion for a request that
  had a PASID, the Global bit of the Translation Completion Data Entry
  must be zero.

Even though it faithfully forwards the G bit through to the ATS
invalidation command there is no way to create G mappings so there is
never any need to send a G invalidation. Thus don't expose global in the
new helpers and leave CMDQ_ATC_0_GLOBAL unused.

Reviewed-by: Mostafa Saleh <smostafa@google.com>
Reviewed-by: Pranjal Shrivastava <praan@google.com>
Tested-by: Pranjal Shrivastava <praan@google.com>
Tested-by: Mostafa Saleh <smostafa@google.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Tested-by: Samiullah Khawaja <skhawaja@google.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h