iommu/io-pgtable-arm: Rationalise TCR handling
authorRobin Murphy <robin.murphy@arm.com>
Fri, 25 Oct 2019 18:08:38 +0000 (19:08 +0100)
committerWill Deacon <will@kernel.org>
Fri, 10 Jan 2020 15:52:24 +0000 (15:52 +0000)
commitfb485eb18e632ff1071662122b9d9b7d40c23c73
treed834505d27be2ba860fe327fa1b004ca3aa42c3a
parent6f932ad369a3c3f853ffc5d93de9a73420e862b1
iommu/io-pgtable-arm: Rationalise TCR handling

Although it's conceptually nice for the io_pgtable_cfg to provide a
standard VMSA TCR value, the reality is that no VMSA-compliant IOMMU
looks exactly like an Arm CPU, and they all have various other TCR
controls which io-pgtable can't be expected to understand. Thus since
there is an expectation that drivers will have to add to the given TCR
value anyway, let's strip it down to just the essentials that are
directly relevant to io-pgtable's inner workings - namely the various
sizes and the walk attributes.

Tested-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
[will: Add missing include of bitfield.h]
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm-smmu-v3.c
drivers/iommu/arm-smmu.c
drivers/iommu/arm-smmu.h
drivers/iommu/io-pgtable-arm-v7s.c
drivers/iommu/io-pgtable-arm.c
drivers/iommu/io-pgtable.c
drivers/iommu/qcom_iommu.c
include/linux/io-pgtable.h