Skip to contentSkip to conversation

iommu/arm-smmu-v3: Miscellaneous clean up

PATCH New Andrew Murray 4 participants 8 messages Oct 10, 2018 IOMMU

lore
Share & tools
lore
#0 lore raw

cover iommu/arm-smmu-v3: Miscellaneous clean up

Remove unnecessary code and license text.

Andrew Murray (2):
iommu/arm-smmu-v3: Add SPDX header iommu/arm-smmu-v3: Remove unnecessary wrapper function

 drivers/iommu/arm-smmu-v3.c | 25 +++++--------------------
 1 file changed, 5 insertions(+), 20 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/2 iommu/arm-smmu-v3: Add SPDX header

Replace license text with SDPX header

---
 drivers/iommu/arm-smmu-v3.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/iommu/arm-smmu-v3.c +1 -12
index db402e8..c7bd18e 100644
@@ -1,18 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * IOMMU API for ARM architected SMMUv3 implementations.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
  * Copyright (C) 2015 ARM Limited
  *
  * Author: Will Deacon <[email protected]>
Signature · 1 line
2.7.4
reviewer
#2 lore raw

PATCH 1/2 iommu/arm-smmu-v3: Add SPDX header

Quoted 1 line · Andrew Murray

Replace license text with SDPX header

Quoted 30 lines
---
  drivers/iommu/arm-smmu-v3.c | 13 +------------
  1 file changed, 1 insertion(+), 12 deletions(-)
drivers/iommu/arm-smmu-v3.c +1 -12
index db402e8..c7bd18e 100644
@@ -1,18 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0
  /*
   * IOMMU API for ARM architected SMMUv3 implementations.
   *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
   * Copyright (C) 2015 ARM Limited
   *
   * Author: Will Deacon <[email protected]>
#3 lore raw

PATCH 2/2 iommu/arm-smmu-v3: Remove unnecessary wrapper function

In reply to Andrew Murray

Simplify the code by removing an unnecessary wrapper function.

This was left behind by commit 2f657add07a8 ("iommu/arm-smmu-v3: Specialise CMD_SYNC handling")

---
 drivers/iommu/arm-smmu-v3.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
drivers/iommu/arm-smmu-v3.c +4 -8
index c7bd18e..6947ccf 100644
@@ -1371,15 +1371,11 @@ static irqreturn_t arm_smmu_combined_irq_handler(int irq, void *dev)
 }
 
 /* IO_PGTABLE API */
-static void __arm_smmu_tlb_sync(struct arm_smmu_device *smmu)
-{
-	arm_smmu_cmdq_issue_sync(smmu);
-}
-
 static void arm_smmu_tlb_sync(void *cookie)
 {
 	struct arm_smmu_domain *smmu_domain = cookie;
-	__arm_smmu_tlb_sync(smmu_domain->smmu);
+
+	arm_smmu_cmdq_issue_sync(smmu_domain->smmu);
 }
 
 static void arm_smmu_tlb_inv_context(void *cookie)
@@ -1404,7 +1400,7 @@ static void arm_smmu_tlb_inv_context(void *cookie)
 	 * to guarantee those are observed before the TLBI. Do be careful, 007.
 	 */
 	arm_smmu_cmdq_issue_cmd(smmu, &cmd);
-	__arm_smmu_tlb_sync(smmu);
+	arm_smmu_cmdq_issue_sync(smmu);
 }
 
 static void arm_smmu_tlb_inv_range_nosync(unsigned long iova, size_t size,
@@ -1793,7 +1789,7 @@ static void arm_smmu_iotlb_sync(struct iommu_domain *domain)
 	struct arm_smmu_device *smmu = to_smmu_domain(domain)->smmu;
 
 	if (smmu)
-		__arm_smmu_tlb_sync(smmu);
+		arm_smmu_cmdq_issue_sync(smmu);
 }
 
 static phys_addr_t
Signature · 1 line
2.7.4
reviewer
#4 lore raw

PATCH 2/2 iommu/arm-smmu-v3: Remove unnecessary wrapper function

Quoted 4 lines · Andrew Murray

Simplify the code by removing an unnecessary wrapper function.

This was left behind by commit 2f657add07a8 ("iommu/arm-smmu-v3: Specialise CMD_SYNC handling")

Oops, sorry about that ;)

Quoted 46 lines
---
  drivers/iommu/arm-smmu-v3.c | 12 ++++--------
  1 file changed, 4 insertions(+), 8 deletions(-)
drivers/iommu/arm-smmu-v3.c +4 -8
index c7bd18e..6947ccf 100644
@@ -1371,15 +1371,11 @@ static irqreturn_t arm_smmu_combined_irq_handler(int irq, void *dev)
  }
 
  /* IO_PGTABLE API */
-static void __arm_smmu_tlb_sync(struct arm_smmu_device *smmu)
-{
-	arm_smmu_cmdq_issue_sync(smmu);
-}
-
  static void arm_smmu_tlb_sync(void *cookie)
  {
  	struct arm_smmu_domain *smmu_domain = cookie;
-	__arm_smmu_tlb_sync(smmu_domain->smmu);
+
+	arm_smmu_cmdq_issue_sync(smmu_domain->smmu);
  }
 
  static void arm_smmu_tlb_inv_context(void *cookie)
@@ -1404,7 +1400,7 @@ static void arm_smmu_tlb_inv_context(void *cookie)
  	 * to guarantee those are observed before the TLBI. Do be careful, 007.
  	 */
  	arm_smmu_cmdq_issue_cmd(smmu, &cmd);
-	__arm_smmu_tlb_sync(smmu);
+	arm_smmu_cmdq_issue_sync(smmu);
  }
 
  static void arm_smmu_tlb_inv_range_nosync(unsigned long iova, size_t size,
@@ -1793,7 +1789,7 @@ static void arm_smmu_iotlb_sync(struct iommu_domain *domain)
  	struct arm_smmu_device *smmu = to_smmu_domain(domain)->smmu;
 
  	if (smmu)
-		__arm_smmu_tlb_sync(smmu);
+		arm_smmu_cmdq_issue_sync(smmu);
  }
 
  static phys_addr_t
#5 lore raw

cover iommu/arm-smmu-v3: Miscellaneous clean up

In reply to Andrew Murray
Quoted 1 line · Andrew Murray

Remove unnecessary code and license text.

These two look fine to me.

Joerg -- you can pick them up if you're still queueing patches, otherwise I'll include them for 4.21.

Cheers,

Will

maintainer Applied
#6 lore raw

cover iommu/arm-smmu-v3: Miscellaneous clean up

Quoted 2 lines · Will Deacon

Joerg -- you can pick them up if you're still queueing patches, otherwise I'll include them for 4.21.

Applied to arm/smmu.

#7 lore raw

cover iommu/arm-smmu-v3: Miscellaneous clean up

Quoted 5 lines · Joerg Roedel
Quoted 2 lines · Will Deacon

Joerg -- you can pick them up if you're still queueing patches, otherwise I'll include them for 4.21.

Applied to arm/smmu.

Thanks, Joerg.

Will