Loading Documentation/devicetree/bindings/iommu/arm,smmu.txt +8 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,14 @@ conditions. address size faults are due to a fundamental programming error from which we don't care about recovering anyways. - qcom,skip-init : Disable resetting configuration for all context banks during device reset. This is useful for targets where some context banks are dedicated to other execution environments outside of Linux and those other EEs are programming their own stream match tables, SCTLR, etc. Without setting this option we will trample on their configuration. - qcom,dynamic : Allow dynamic domains to be attached. This is only useful if the upstream hardware is capable of switching between multiple domains within a single context bank. Loading arch/arm64/boot/dts/qcom/msm-arm-smmu-sdm845.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ <0x150c2000 0x20>; reg-names = "base", "tcu-base"; #iommu-cells = <2>; qcom,skip-init; qcom,use-3-lvl-tables; #global-interrupts = <1>; #size-cells = <1>; Loading drivers/iommu/arm-smmu.c +7 −3 Original line number Diff line number Diff line Loading @@ -412,6 +412,7 @@ struct arm_smmu_device { #define ARM_SMMU_OPT_SECURE_CFG_ACCESS (1 << 0) #define ARM_SMMU_OPT_FATAL_ASF (1 << 1) #define ARM_SMMU_OPT_SKIP_INIT (1 << 2) #define ARM_SMMU_OPT_DYNAMIC (1 << 3) #define ARM_SMMU_OPT_3LVL_TABLES (1 << 4) u32 options; Loading Loading @@ -530,6 +531,7 @@ static bool using_legacy_binding, using_generic_binding; static struct arm_smmu_option_prop arm_smmu_options[] = { { ARM_SMMU_OPT_SECURE_CFG_ACCESS, "calxeda,smmu-secure-config-access" }, { ARM_SMMU_OPT_FATAL_ASF, "qcom,fatal-asf" }, { ARM_SMMU_OPT_SKIP_INIT, "qcom,skip-init" }, { ARM_SMMU_OPT_DYNAMIC, "qcom,dynamic" }, { ARM_SMMU_OPT_3LVL_TABLES, "qcom,use-3-lvl-tables" }, { 0, NULL}, Loading Loading @@ -3221,10 +3223,12 @@ static void arm_smmu_device_reset(struct arm_smmu_device *smmu) * Reset stream mapping groups: Initial values mark all SMRn as * invalid and all S2CRn as bypass unless overridden. */ if (!(smmu->options & ARM_SMMU_OPT_SKIP_INIT)) { for (i = 0; i < smmu->num_mapping_groups; ++i) arm_smmu_write_sme(smmu, i); arm_smmu_context_bank_reset(smmu); } /* Invalidate the TLB, just in case */ writel_relaxed(0, gr0_base + ARM_SMMU_GR0_TLBIALLH); Loading Loading
Documentation/devicetree/bindings/iommu/arm,smmu.txt +8 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,14 @@ conditions. address size faults are due to a fundamental programming error from which we don't care about recovering anyways. - qcom,skip-init : Disable resetting configuration for all context banks during device reset. This is useful for targets where some context banks are dedicated to other execution environments outside of Linux and those other EEs are programming their own stream match tables, SCTLR, etc. Without setting this option we will trample on their configuration. - qcom,dynamic : Allow dynamic domains to be attached. This is only useful if the upstream hardware is capable of switching between multiple domains within a single context bank. Loading
arch/arm64/boot/dts/qcom/msm-arm-smmu-sdm845.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ <0x150c2000 0x20>; reg-names = "base", "tcu-base"; #iommu-cells = <2>; qcom,skip-init; qcom,use-3-lvl-tables; #global-interrupts = <1>; #size-cells = <1>; Loading
drivers/iommu/arm-smmu.c +7 −3 Original line number Diff line number Diff line Loading @@ -412,6 +412,7 @@ struct arm_smmu_device { #define ARM_SMMU_OPT_SECURE_CFG_ACCESS (1 << 0) #define ARM_SMMU_OPT_FATAL_ASF (1 << 1) #define ARM_SMMU_OPT_SKIP_INIT (1 << 2) #define ARM_SMMU_OPT_DYNAMIC (1 << 3) #define ARM_SMMU_OPT_3LVL_TABLES (1 << 4) u32 options; Loading Loading @@ -530,6 +531,7 @@ static bool using_legacy_binding, using_generic_binding; static struct arm_smmu_option_prop arm_smmu_options[] = { { ARM_SMMU_OPT_SECURE_CFG_ACCESS, "calxeda,smmu-secure-config-access" }, { ARM_SMMU_OPT_FATAL_ASF, "qcom,fatal-asf" }, { ARM_SMMU_OPT_SKIP_INIT, "qcom,skip-init" }, { ARM_SMMU_OPT_DYNAMIC, "qcom,dynamic" }, { ARM_SMMU_OPT_3LVL_TABLES, "qcom,use-3-lvl-tables" }, { 0, NULL}, Loading Loading @@ -3221,10 +3223,12 @@ static void arm_smmu_device_reset(struct arm_smmu_device *smmu) * Reset stream mapping groups: Initial values mark all SMRn as * invalid and all S2CRn as bypass unless overridden. */ if (!(smmu->options & ARM_SMMU_OPT_SKIP_INIT)) { for (i = 0; i < smmu->num_mapping_groups; ++i) arm_smmu_write_sme(smmu, i); arm_smmu_context_bank_reset(smmu); } /* Invalidate the TLB, just in case */ writel_relaxed(0, gr0_base + ARM_SMMU_GR0_TLBIALLH); Loading