Commit 0785deab authored by Zhen Lei's avatar Zhen Lei
Browse files

iommu/arm-smmu-v3: Allow disabling ECMDQs at boot time

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7YUNJ



--------------------------------

Add boot option arm_smmu_v3.disable_ecmdq to support disabling ECMDQ
during startup. For example, add arm_smmu_v3.disable_ecmdq=1 in command
line to disable ECMDQ and use normal CMDQ.

Signed-off-by: default avatarZhen Lei <thunder.leizhen@huawei.com>
parent 8bcb9c38
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -46,6 +46,10 @@ module_param(disable_msipolling, bool, 0444);
MODULE_PARM_DESC(disable_msipolling,
	"Disable MSI-based polling for CMD_SYNC completion.");

static bool disable_ecmdq;
module_param(disable_ecmdq, bool, 0444);
MODULE_PARM_DESC(disable_ecmdq,	"Disable the use of ECMDQs");

#ifdef CONFIG_SMMU_BYPASS_DEV
struct smmu_bypass_device {
	unsigned short vendor;
@@ -5129,7 +5133,7 @@ static int arm_smmu_device_hw_probe(struct arm_smmu_device *smmu)
	dev_info(smmu->dev, "ias %lu-bit, oas %lu-bit (features 0x%08x)\n",
		 smmu->ias, smmu->oas, smmu->features);

	if (smmu->features & ARM_SMMU_FEAT_ECMDQ) {
	if (smmu->features & ARM_SMMU_FEAT_ECMDQ && !disable_ecmdq) {
		int err;

		err = arm_smmu_ecmdq_probe(smmu);