iommu/arm-smmu: fixes for 4.2
Subsystems (2)
cover iommu/arm-smmu: fixes for 4.2
Hi Joerg,
Since you're sending a batch of IOMMU fixes tomorrow, could you include these two ARM SMMU fixes as well please?
Cheers,
Will
--->8
Markus Elfring (1):
iommu/arm-smmu: Delete an unnecessary check before the function call
"free_io_pgtable_ops"
Will Deacon (1):
iommu/arm-smmu: Fix broken ATOS check
drivers/iommu/arm-smmu-v3.c | 3 +-- drivers/iommu/arm-smmu.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
Signature · 1 line
2.1.4
PATCH 1/2 iommu/arm-smmu: Fix broken ATOS check
Commit 83a60ed8f0b5 ("iommu/arm-smmu: fix ARM_SMMU_FEAT_TRANS_OPS condition") accidentally negated the ID0_ATOSNS predicate in the ATOS feature check, causing the driver to attempt ATOS requests on SMMUv2 hardware without the ATOS feature implemented.
This patch restores the predicate to the correct value.
--- drivers/iommu/arm-smmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/arm-smmu.c +1 -1
@@ -1566,7 +1566,7 @@ static int arm_smmu_device_cfg_probe(struct arm_smmu_device *smmu)return -ENODEV ; } -if ((id &ID0_S1TS ) && ((smmu->version ==1 ) || (id &ID0_ATOSNS ))) { +if ((id &ID0_S1TS ) && ((smmu->version ==1 ) || !(id &ID0_ATOSNS ))) { smmu->features |=ARM_SMMU_FEAT_TRANS_OPS ;dev_notice (smmu->dev,"\taddress translation ops\n" ); }
Signature · 1 line
2.1.4
PATCH 2/2 iommu/arm-smmu: Delete an unnecessary check before the function call "free_io_pgtable_ops"
In reply to Will DeaconFrom: Markus Elfring <[email protected]>
The free_io_pgtable_ops() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
--- drivers/iommu/arm-smmu-v3.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/iommu/arm-smmu-v3.c +1 -2
@@ -1389,8 +1389,7 @@ static void arm_smmu_domain_free(struct iommu_domain *domain)struct arm_smmu_domain *smmu_domain =to_smmu_domain (domain);struct arm_smmu_device *smmu = smmu_domain->smmu; -if (smmu_domain->pgtbl_ops) -free_io_pgtable_ops (smmu_domain->pgtbl_ops); +free_io_pgtable_ops (smmu_domain->pgtbl_ops);/* Free the CD and ASID, if we allocated them */ if (smmu_domain->stage ==ARM_SMMU_DOMAIN_S1 ) {
Signature · 1 line
2.1.4
Joerg Roedel
maintainercover iommu/arm-smmu: fixes for 4.2
In reply to Will DeaconHi Will,
Quoted 2 lines · Will Deacon
Since you're sending a batch of IOMMU fixes tomorrow, could you include these two ARM SMMU fixes as well please?
Sure, applied directly to my 'next' branch too.
Joerg
Joerg Roedel
maintainercover iommu/arm-smmu: fixes for 4.2
In reply to Will DeaconQuoted 2 lines · Will Deacon
Since you're sending a batch of IOMMU fixes tomorrow, could you include these two ARM SMMU fixes as well please?
Sorry, this got delayed because I was waiting for a testing result of another fix. But this one is pushed out too now and I am going to send the fixes this evening.
Joerg
cover iommu/arm-smmu: fixes for 4.2
Quoted 7 lines · Joerg Roedel
Quoted 2 lines · Will Deacon
Since you're sending a batch of IOMMU fixes tomorrow, could you include these two ARM SMMU fixes as well please?
Sorry, this got delayed because I was waiting for a testing result of another fix. But this one is pushed out too now and I am going to send the fixes this evening.
No problem, thanks Joerg,
I'll probably have a second round of fixes later on, once I've run some more SMMUv3 testing.
Will