* [PATCH 0/2] iommu/arm-smmu: fixes for 4.2
@ 2015-06-29 16:47 Will Deacon
2015-06-29 16:47 ` [PATCH 1/2] iommu/arm-smmu: Fix broken ATOS check Will Deacon
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Will Deacon @ 2015-06-29 16:47 UTC (permalink / raw)
To: linux-arm-kernel
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(-)
--
2.1.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] iommu/arm-smmu: Fix broken ATOS check
2015-06-29 16:47 [PATCH 0/2] iommu/arm-smmu: fixes for 4.2 Will Deacon
@ 2015-06-29 16:47 ` Will Deacon
2015-06-29 16:47 ` [PATCH 2/2] iommu/arm-smmu: Delete an unnecessary check before the function call "free_io_pgtable_ops" Will Deacon
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Will Deacon @ 2015-06-29 16:47 UTC (permalink / raw)
To: linux-arm-kernel
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.
Cc: <stable@vger.kernel.org> # 4.0+
Reported-by: Varun Sethi <varun.sethi@freescale.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
drivers/iommu/arm-smmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index dce041b1c139..4cd0c29cb585 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -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");
}
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] iommu/arm-smmu: Delete an unnecessary check before the function call "free_io_pgtable_ops"
2015-06-29 16:47 [PATCH 0/2] iommu/arm-smmu: fixes for 4.2 Will Deacon
2015-06-29 16:47 ` [PATCH 1/2] iommu/arm-smmu: Fix broken ATOS check Will Deacon
@ 2015-06-29 16:47 ` Will Deacon
2015-06-29 19:43 ` [PATCH 0/2] iommu/arm-smmu: fixes for 4.2 Joerg Roedel
2015-07-01 7:09 ` Joerg Roedel
3 siblings, 0 replies; 6+ messages in thread
From: Will Deacon @ 2015-06-29 16:47 UTC (permalink / raw)
To: linux-arm-kernel
From: Markus Elfring <elfring@users.sourceforge.net>
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.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
drivers/iommu/arm-smmu-v3.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index f14130121298..8e9ec81ce4bb 100644
--- a/drivers/iommu/arm-smmu-v3.c
+++ b/drivers/iommu/arm-smmu-v3.c
@@ -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) {
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 0/2] iommu/arm-smmu: fixes for 4.2
2015-06-29 16:47 [PATCH 0/2] iommu/arm-smmu: fixes for 4.2 Will Deacon
2015-06-29 16:47 ` [PATCH 1/2] iommu/arm-smmu: Fix broken ATOS check Will Deacon
2015-06-29 16:47 ` [PATCH 2/2] iommu/arm-smmu: Delete an unnecessary check before the function call "free_io_pgtable_ops" Will Deacon
@ 2015-06-29 19:43 ` Joerg Roedel
2015-07-01 7:09 ` Joerg Roedel
3 siblings, 0 replies; 6+ messages in thread
From: Joerg Roedel @ 2015-06-29 19:43 UTC (permalink / raw)
To: linux-arm-kernel
Hi Will,
On Mon, Jun 29, 2015 at 05:47:41PM +0100, Will Deacon wrote:
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 0/2] iommu/arm-smmu: fixes for 4.2
2015-06-29 16:47 [PATCH 0/2] iommu/arm-smmu: fixes for 4.2 Will Deacon
` (2 preceding siblings ...)
2015-06-29 19:43 ` [PATCH 0/2] iommu/arm-smmu: fixes for 4.2 Joerg Roedel
@ 2015-07-01 7:09 ` Joerg Roedel
2015-07-01 9:12 ` Will Deacon
3 siblings, 1 reply; 6+ messages in thread
From: Joerg Roedel @ 2015-07-01 7:09 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jun 29, 2015 at 05:47:41PM +0100, Will Deacon wrote:
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 0/2] iommu/arm-smmu: fixes for 4.2
2015-07-01 7:09 ` Joerg Roedel
@ 2015-07-01 9:12 ` Will Deacon
0 siblings, 0 replies; 6+ messages in thread
From: Will Deacon @ 2015-07-01 9:12 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jul 01, 2015 at 08:09:02AM +0100, Joerg Roedel wrote:
> On Mon, Jun 29, 2015 at 05:47:41PM +0100, Will Deacon wrote:
> > 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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-07-01 9:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-29 16:47 [PATCH 0/2] iommu/arm-smmu: fixes for 4.2 Will Deacon
2015-06-29 16:47 ` [PATCH 1/2] iommu/arm-smmu: Fix broken ATOS check Will Deacon
2015-06-29 16:47 ` [PATCH 2/2] iommu/arm-smmu: Delete an unnecessary check before the function call "free_io_pgtable_ops" Will Deacon
2015-06-29 19:43 ` [PATCH 0/2] iommu/arm-smmu: fixes for 4.2 Joerg Roedel
2015-07-01 7:09 ` Joerg Roedel
2015-07-01 9:12 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).