OSDN Git Service

iommu/arm-smmu-v3: Abort all transactions if SMMU is enabled in kdump kernel
authorWill Deacon <will.deacon@arm.com>
Wed, 25 Jul 2018 14:58:43 +0000 (15:58 +0100)
committerWill Deacon <will.deacon@arm.com>
Fri, 27 Jul 2018 10:12:37 +0000 (11:12 +0100)
commitb63b3439b85609338e4faabd5d2588dbda137e5c
treed11cbaeb0c03b49fd93640667747f5be5587e418
parenta71792dee2a33d2e935d4b67dd63924f5ceb203d
iommu/arm-smmu-v3: Abort all transactions if SMMU is enabled in kdump kernel

If we find that the SMMU is enabled during probe, we reset it by
re-initialising its registers and either enabling translation or placing
it into bypass based on the disable_bypass commandline option.

In the case of a kdump kernel, the SMMU won't have been shutdown cleanly
by the previous kernel and there may be concurrent DMA through the SMMU.
Rather than reset the SMMU to bypass, which would likely lead to rampant
data corruption, we can instead configure the SMMU to abort all incoming
transactions when we find that it is enabled from within a kdump kernel.

Reported-by: Sameer Goel <sgoel@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/arm-smmu-v3.c