From 08123f9553dee8e97446796869d1795b30fce29c Mon Sep 17 00:00:00 2001 From: Vivek Kumar Date: Mon, 11 Nov 2019 17:26:49 +0530 Subject: iommu: arm-smmu: Make restore of smmu-context runtime detectable Update the logic to restore smmu-context-bank registers using an additional 'smmu_restore' flag which is only set during hibernation restore, which makes the logic runtime along with the compile-time hibernation flag. Change-Id: Ic62442601c9dc7ceff4745fdc70b6dc3f56769d7 Signed-off-by: Vivek Kumar --- drivers/iommu/arm-smmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 5e63c60e97b5..41a088f310d3 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -4195,7 +4195,7 @@ static void arm_smmu_device_reset(struct arm_smmu_device *smmu) * invalid and all S2CRn as bypass unless overridden. */ if (!(smmu->options & ARM_SMMU_OPT_SKIP_INIT) || - IS_ENABLED(CONFIG_HIBERNATION)) { + (IS_ENABLED(CONFIG_HIBERNATION) && smmu->smmu_restore)) { for (i = 0; i < smmu->num_mapping_groups; ++i) arm_smmu_write_sme(smmu, i); -- cgit v1.2.3