Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c57189c4 authored by Charan Teja Reddy's avatar Charan Teja Reddy Committed by Patrick Daly
Browse files

iommu: arm-smmu: define no-dynamic-asid property for dynamic domains



On some SMMU hardware revisions, that have dynamic domains with an
unique asid per domain which shares the same context bank, TLBIASID
command will not behave properly because of assocaition of multiple
asid's with the same context bank. To associate a single ASID for all
domains of a context bank, use qcom,no-dynamic-asid property.

Change-Id: I2f9b601738704770fa67713174e1ace5cd3212f2
Signed-off-by: default avatarCharan Teja Reddy <charante@codeaurora.org>
parent 11ec78dc
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -250,6 +250,7 @@ struct arm_smmu_device {
#define ARM_SMMU_OPT_NO_ASID_RETENTION	(1 << 5)
#define ARM_SMMU_OPT_STATIC_CB		(1 << 6)
#define ARM_SMMU_OPT_DISABLE_ATOS	(1 << 7)
#define ARM_SMMU_OPT_NO_DYNAMIC_ASID	(1 << 8)
	u32				options;
	enum arm_smmu_arch_version	version;
	enum arm_smmu_implementation	model;
@@ -387,6 +388,7 @@ static struct arm_smmu_option_prop arm_smmu_options[] = {
	{ ARM_SMMU_OPT_NO_ASID_RETENTION, "qcom,no-asid-retention" },
	{ ARM_SMMU_OPT_STATIC_CB, "qcom,enable-static-cb"},
	{ ARM_SMMU_OPT_DISABLE_ATOS, "qcom,disable-atos" },
	{ ARM_SMMU_OPT_NO_DYNAMIC_ASID, "qcom,no-dynamic-asid" },
	{ 0, NULL},
};

@@ -1784,7 +1786,7 @@ static int arm_smmu_init_asid(struct iommu_domain *domain,
	bool dynamic = is_dynamic_domain(domain);
	int ret;

	if (!dynamic) {
	if (!dynamic || (smmu->options & ARM_SMMU_OPT_NO_DYNAMIC_ASID)) {
		cfg->asid = cfg->cbndx + 1;
	} else {
		mutex_lock(&smmu->idr_mutex);