mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
iommu/arm-smmu: Fix DOMAIN_ATTR_PAGE_TABLE_FORCE_COHERENT enablement
The functionality provided by DOMAIN_ATTR_PAGE_TABLE_FORCE_COHERENT can be guaranteed, independent of CONFIG_QCOM_IOMMU_IO_PGTABLE_QUIRKS, so do not guard its enablement with that config. Change-Id: Ifae4280f256b99529ae5a074dbc91b37b5d87e21 Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
parent
b38b5109bf
commit
516747fdf7
1 changed files with 11 additions and 15 deletions
|
|
@ -3674,22 +3674,18 @@ static int __arm_smmu_domain_set_attr2(struct iommu_domain *domain,
|
|||
case DOMAIN_ATTR_PAGE_TABLE_FORCE_COHERENT: {
|
||||
int force_coherent = *((int *)data);
|
||||
|
||||
if (IS_ENABLED(CONFIG_QCOM_IOMMU_IO_PGTABLE_QUIRKS)) {
|
||||
if (smmu_domain->smmu != NULL) {
|
||||
dev_err(smmu_domain->smmu->dev,
|
||||
"cannot change force coherent attribute while attached\n");
|
||||
ret = -EBUSY;
|
||||
} else if (force_coherent) {
|
||||
set_bit(DOMAIN_ATTR_PAGE_TABLE_FORCE_COHERENT,
|
||||
smmu_domain->attributes);
|
||||
ret = 0;
|
||||
} else {
|
||||
clear_bit(DOMAIN_ATTR_PAGE_TABLE_FORCE_COHERENT,
|
||||
smmu_domain->attributes);
|
||||
ret = 0;
|
||||
}
|
||||
if (smmu_domain->smmu != NULL) {
|
||||
dev_err(smmu_domain->smmu->dev,
|
||||
"cannot change force coherent attribute while attached\n");
|
||||
ret = -EBUSY;
|
||||
} else if (force_coherent) {
|
||||
set_bit(DOMAIN_ATTR_PAGE_TABLE_FORCE_COHERENT,
|
||||
smmu_domain->attributes);
|
||||
ret = 0;
|
||||
} else {
|
||||
ret = -ENOTSUPP;
|
||||
clear_bit(DOMAIN_ATTR_PAGE_TABLE_FORCE_COHERENT,
|
||||
smmu_domain->attributes);
|
||||
ret = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue