Skip to contentSkip to conversation

iommu/io-pgtable-arm: Remove unused macro iopte_prot

PATCH Applied Daniel Mentz 4 participants 4 messages Jul 8, 2025 – Jul 14, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/io-pgtable-arm: Remove unused macro iopte_prot

Commit 33729a5fc0ca ("iommu/io-pgtable-arm: Remove split on unmap behavior") removed the last user of the macro iopte_prot. Remove the macro definition of iopte_prot as well as three other related definitions.

Fixes 33729a5fc0ca ("iommu/io-pgtable-arm: Remove split on unmap behavior")
---
 drivers/iommu/io-pgtable-arm.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/iommu/io-pgtable-arm.c +0 -7
index 96425e92f313..7e8e2216c294 100644
@@ -85,11 +85,6 @@
 #define ARM_LPAE_PTE_NS			(((arm_lpae_iopte)1) << 5)
 #define ARM_LPAE_PTE_VALID		(((arm_lpae_iopte)1) << 0)
 
-#define ARM_LPAE_PTE_ATTR_LO_MASK	(((arm_lpae_iopte)0x3ff) << 2)
-/* Ignore the contiguous bit for block splitting */
-#define ARM_LPAE_PTE_ATTR_HI_MASK	(ARM_LPAE_PTE_XN | ARM_LPAE_PTE_DBM)
-#define ARM_LPAE_PTE_ATTR_MASK		(ARM_LPAE_PTE_ATTR_LO_MASK |	\
-					 ARM_LPAE_PTE_ATTR_HI_MASK)
 /* Software bit for solving coherency races */
 #define ARM_LPAE_PTE_SW_SYNC		(((arm_lpae_iopte)1) << 55)
 
@@ -155,8 +150,6 @@
 #define iopte_type(pte)					\
 	(((pte) >> ARM_LPAE_PTE_TYPE_SHIFT) & ARM_LPAE_PTE_TYPE_MASK)
 
-#define iopte_prot(pte)	((pte) & ARM_LPAE_PTE_ATTR_MASK)
-
 #define iopte_writeable_dirty(pte)				\
 	(((pte) & ARM_LPAE_PTE_AP_WR_CLEAN_MASK) == ARM_LPAE_PTE_DBM)
 
Signature · 1 line
2.50.0.727.gbf7dc18ff4-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Daniel Mentz

Commit 33729a5fc0ca ("iommu/io-pgtable-arm: Remove split on unmap behavior") removed the last user of the macro iopte_prot. Remove the macro definition of iopte_prot as well as three other related definitions.

Fixes 33729a5fc0ca ("iommu/io-pgtable-arm: Remove split on unmap behavior")
---
 drivers/iommu/io-pgtable-arm.c | 7 -------
 1 file changed, 7 deletions(-)

Jason

Reviewed-by on v1 1/1
#2 lore raw
In reply to Daniel Mentz
Quoted 7 lines · Daniel Mentz

Commit 33729a5fc0ca ("iommu/io-pgtable-arm: Remove split on unmap behavior") removed the last user of the macro iopte_prot. Remove the macro definition of iopte_prot as well as three other related definitions.

Fixes 33729a5fc0ca ("iommu/io-pgtable-arm: Remove split on unmap behavior")

Best regards,
Liviu

Quoted 32 lines
---
 drivers/iommu/io-pgtable-arm.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/iommu/io-pgtable-arm.c +0 -7
index 96425e92f313..7e8e2216c294 100644
@@ -85,11 +85,6 @@
 #define ARM_LPAE_PTE_NS			(((arm_lpae_iopte)1) << 5)
 #define ARM_LPAE_PTE_VALID		(((arm_lpae_iopte)1) << 0)
 
-#define ARM_LPAE_PTE_ATTR_LO_MASK	(((arm_lpae_iopte)0x3ff) << 2)
-/* Ignore the contiguous bit for block splitting */
-#define ARM_LPAE_PTE_ATTR_HI_MASK	(ARM_LPAE_PTE_XN | ARM_LPAE_PTE_DBM)
-#define ARM_LPAE_PTE_ATTR_MASK		(ARM_LPAE_PTE_ATTR_LO_MASK |	\
-					 ARM_LPAE_PTE_ATTR_HI_MASK)
 /* Software bit for solving coherency races */
 #define ARM_LPAE_PTE_SW_SYNC		(((arm_lpae_iopte)1) << 55)
 
@@ -155,8 +150,6 @@
 #define iopte_type(pte)					\
 	(((pte) >> ARM_LPAE_PTE_TYPE_SHIFT) & ARM_LPAE_PTE_TYPE_MASK)
 
-#define iopte_prot(pte)	((pte) & ARM_LPAE_PTE_ATTR_MASK)
-
 #define iopte_writeable_dirty(pte)				\
 	(((pte) & ARM_LPAE_PTE_AP_WR_CLEAN_MASK) == ARM_LPAE_PTE_DBM)
 
Signature · 1 line
2.50.0.727.gbf7dc18ff4-goog
Signature · 8 lines
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
maintainer Applied
#3 lore raw
In reply to Daniel Mentz
Quoted 6 lines · Daniel Mentz

Commit 33729a5fc0ca ("iommu/io-pgtable-arm: Remove split on unmap behavior") removed the last user of the macro iopte_prot. Remove the macro definition of iopte_prot as well as three other related definitions.

Applied to iommu (arm/smmu/updates), thanks!

[1/1] iommu/io-pgtable-arm: Remove unused macro iopte_prot

      https://git.kernel.org/iommu/c/ec7ca73144e9

Cheers,

Signature · 5 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev