OSDN Git Service

iommu/arm-smmu: Sort out coherency
authorRobin Murphy <Robin.Murphy@arm.com>
Wed, 29 Jul 2015 18:46:05 +0000 (19:46 +0100)
committerWill Deacon <will.deacon@arm.com>
Fri, 31 Jul 2015 10:42:53 +0000 (11:42 +0100)
commitbae2c2d421cdea9dd8d62425eef99e389584cdb3
tree1bffdcbb32e05ed42cd7268ec47325845d67428e
parent28c8b4045b18b013e05656b493ce9a57cbf1f09a
iommu/arm-smmu: Sort out coherency

Currently, we detect whether the SMMU has coherent page table walk
capability from the IDR0.CTTW field, and base our cache maintenance
decisions on that. In preparation for fixing the bogus DMA API usage,
however, we need to ensure that the DMA API agrees about this, which
necessitates deferring to the dma-coherent property in the device tree
for the final say.

As an added bonus, since systems exist where an external CTTW signal
has been tied off incorrectly at integration, allowing DT to override
it offers a neat workaround for coherency issues with such SMMUs.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Documentation/devicetree/bindings/iommu/arm,smmu.txt
drivers/iommu/arm-smmu.c