iommu/arm-smmu-v3: move stall_enabled to the cd table
authorMichael Shavit <mshavit@google.com>
Fri, 15 Sep 2023 13:17:35 +0000 (21:17 +0800)
committerWill Deacon <will@kernel.org>
Thu, 12 Oct 2023 16:08:17 +0000 (17:08 +0100)
commit1228cc509fc6bf7b10f0c5e202086979e4bbd43a
tree989c86b4006ff07e28bca10fd86c7c5067977c8c
parente3aad74c51a7012233ebe249c8ed86bb01c4a3f0
iommu/arm-smmu-v3: move stall_enabled to the cd table

A domain can be attached to multiple masters with different
master->stall_enabled values. The stall bit of a CD entry should follow
master->stall_enabled and has an inverse relationship with the
STE.S1STALLD bit.

The stall_enabled bit does not depend on any property of the domain, so
move it out of the arm_smmu_domain struct.  Move it to the CD table
struct so that it can fully describe how CD entries should be written to
it.

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Michael Shavit <mshavit@google.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Link: https://lore.kernel.org/r/20230915211705.v8.4.I5aa89c849228794a64146cfe86df21fb71629384@changeid
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