Skip to contentSkip to conversation

iommu/ipmmu-vmsa: change IOMMU_EXEC to IOMMU_NOEXEC

PATCH Superseded Laurent Pinchart 3 participants 4 messages Dec 15, 2014 – Jan 5, 2015 1 message not in the archive

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

PATCH v2 1/1 iommu/ipmmu-vmsa: change IOMMU_EXEC to IOMMU_NOEXEC

From: Laurent Pinchart <[email protected]>

Commit a720b41c41f5a7e4 ("iommu/arm-smmu: change IOMMU_EXEC to IOMMU_NOEXEC") has inverted and replaced the IOMMU_EXEC flag with IOMMU_NOEXEC. Update the driver accordingly.

---
 drivers/iommu/ipmmu-vmsa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Changes since v1:

- Rewrote the commit message

Joerg, this is a compilation breakage fix for v3.19. Could you please take it in your tree and submit it early during the -rc cycle ?

drivers/iommu/ipmmu-vmsa.c +3 -3
index 68dfb0f..7486931 100644
@@ -558,7 +558,7 @@ static pmd_t *ipmmu_alloc_pmd(struct ipmmu_vmsa_device *mmu, pgd_t *pgd,
 
 static u64 ipmmu_page_prot(unsigned int prot, u64 type)
 {
-	u64 pgprot = ARM_VMSA_PTE_XN | ARM_VMSA_PTE_nG | ARM_VMSA_PTE_AF
+	u64 pgprot = ARM_VMSA_PTE_nG | ARM_VMSA_PTE_AF
 		   | ARM_VMSA_PTE_SH_IS | ARM_VMSA_PTE_AP_UNPRIV
 		   | ARM_VMSA_PTE_NS | type;
 
@@ -568,8 +568,8 @@ static u64 ipmmu_page_prot(unsigned int prot, u64 type)
 	if (prot & IOMMU_CACHE)
 		pgprot |= IMMAIR_ATTR_IDX_WBRWA << ARM_VMSA_PTE_ATTRINDX_SHIFT;
 
-	if (prot & IOMMU_EXEC)
-		pgprot &= ~ARM_VMSA_PTE_XN;
+	if (prot & IOMMU_NOEXEC)
+		pgprot |= ARM_VMSA_PTE_XN;
 	else if (!(prot & (IOMMU_READ | IOMMU_WRITE)))
 		/* If no access create a faulting entry to avoid TLB fills. */
 		pgprot &= ~ARM_VMSA_PTE_PAGE;
Signature · 3 lines
Regards,

Laurent Pinchart
#1 lore raw

PATCH v2 1/1 iommu/ipmmu-vmsa: change IOMMU_EXEC to IOMMU_NOEXEC

Hi Joerg,

Ping ?

Quoted 44 lines · On Monday 15 December 2014 20:41:13 Laurent Pinchart wrote:

From: Laurent Pinchart <[email protected]>

Commit a720b41c41f5a7e4 ("iommu/arm-smmu: change IOMMU_EXEC to IOMMU_NOEXEC") has inverted and replaced the IOMMU_EXEC flag with IOMMU_NOEXEC. Update the driver accordingly.

---
 drivers/iommu/ipmmu-vmsa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Changes since v1:

- Rewrote the commit message

Joerg, this is a compilation breakage fix for v3.19. Could you please take it in your tree and submit it early during the -rc cycle ?

drivers/iommu/ipmmu-vmsa.c +1 -1
index 68dfb0f..7486931 100644
@@ -558,7 +558,7 @@ static pmd_t *ipmmu_alloc_pmd(struct ipmmu_vmsa_device
 *mmu, pgd_t *pgd,
 
 static u64 ipmmu_page_prot(unsigned int prot, u64 type)
 {
-	u64 pgprot = ARM_VMSA_PTE_XN | ARM_VMSA_PTE_nG | ARM_VMSA_PTE_AF
+	u64 pgprot = ARM_VMSA_PTE_nG | ARM_VMSA_PTE_AF
 
 		   | ARM_VMSA_PTE_SH_IS | ARM_VMSA_PTE_AP_UNPRIV
drivers/iommu/ipmmu-vmsa.c +2 -2
 		   | ARM_VMSA_PTE_NS | type;
@@ -568,8 +568,8 @@ static u64 ipmmu_page_prot(unsigned int prot, u64 type)
 	if (prot & IOMMU_CACHE)
 		pgprot |= IMMAIR_ATTR_IDX_WBRWA << ARM_VMSA_PTE_ATTRINDX_SHIFT;
 
-	if (prot & IOMMU_EXEC)
-		pgprot &= ~ARM_VMSA_PTE_XN;
+	if (prot & IOMMU_NOEXEC)
+		pgprot |= ARM_VMSA_PTE_XN;
 	else if (!(prot & (IOMMU_READ | IOMMU_WRITE)))
 		/* If no access create a faulting entry to avoid TLB fills. */
 		pgprot &= ~ARM_VMSA_PTE_PAGE;
Signature · 3 lines
Regards,

Laurent Pinchart

A message that is not in the archive (sent off-list or not yet received): 1418668873-5091-1-git-send-email-laurent.pinchart-ryLnwIuWjnjg/[email protected]

#3 lore raw

Hi Joerg,

Ping ?

Quoted 44 lines · On Monday 15 December 2014 20:41:13 Laurent Pinchart wrote:

From: Laurent Pinchart <laurent.pinchart+renesas-ryLnwIuWjnjg/[email protected]>

Commit a720b41c41f5a7e4 ("iommu/arm-smmu: change IOMMU_EXEC to IOMMU_NOEXEC") has inverted and replaced the IOMMU_EXEC flag with IOMMU_NOEXEC. Update the driver accordingly.

---
 drivers/iommu/ipmmu-vmsa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Changes since v1:

- Rewrote the commit message

Joerg, this is a compilation breakage fix for v3.19. Could you please take it in your tree and submit it early during the -rc cycle ?

drivers/iommu/ipmmu-vmsa.c +1 -1
index 68dfb0f..7486931 100644
@@ -558,7 +558,7 @@ static pmd_t *ipmmu_alloc_pmd(struct ipmmu_vmsa_device
 *mmu, pgd_t *pgd,
 
 static u64 ipmmu_page_prot(unsigned int prot, u64 type)
 {
-	u64 pgprot = ARM_VMSA_PTE_XN | ARM_VMSA_PTE_nG | ARM_VMSA_PTE_AF
+	u64 pgprot = ARM_VMSA_PTE_nG | ARM_VMSA_PTE_AF
 
 		   | ARM_VMSA_PTE_SH_IS | ARM_VMSA_PTE_AP_UNPRIV
drivers/iommu/ipmmu-vmsa.c +2 -2
 		   | ARM_VMSA_PTE_NS | type;
@@ -568,8 +568,8 @@ static u64 ipmmu_page_prot(unsigned int prot, u64 type)
 	if (prot & IOMMU_CACHE)
 		pgprot |= IMMAIR_ATTR_IDX_WBRWA << ARM_VMSA_PTE_ATTRINDX_SHIFT;
 
-	if (prot & IOMMU_EXEC)
-		pgprot &= ~ARM_VMSA_PTE_XN;
+	if (prot & IOMMU_NOEXEC)
+		pgprot |= ARM_VMSA_PTE_XN;
 	else if (!(prot & (IOMMU_READ | IOMMU_WRITE)))
 		/* If no access create a faulting entry to avoid TLB fills. */
 		pgprot &= ~ARM_VMSA_PTE_PAGE;
Signature · 3 lines
Regards,

Laurent Pinchart
maintainer
#4 lore raw

PATCH v2 1/1 iommu/ipmmu-vmsa: change IOMMU_EXEC to IOMMU_NOEXEC

In reply to Laurent Pinchart
Quoted 2 lines · Laurent Pinchart

Joerg, this is a compilation breakage fix for v3.19. Could you please take it in your tree and submit it early during the -rc cycle ?

Patch applied, sorry for the delay.