[PATCH 3/9] UML - Remove pte_mkexec

From: Jeff Dike
Date: Thu Jun 29 2006 - 17:37:36 EST


Andi is making pte_mkexec go away, and UML had one of the last uses.

This removes the use and the definition.

Signed-off-by: Jeff Dike <jdike@xxxxxxxxxxx>

Index: linux-2.6.16-rc-mm/arch/um/kernel/skas/mmu.c
===================================================================
--- linux-2.6.16-rc-mm.orig/arch/um/kernel/skas/mmu.c 2006-06-26 14:49:53.000000000 -0400
+++ linux-2.6.16-rc-mm/arch/um/kernel/skas/mmu.c 2006-06-28 13:07:26.000000000 -0400
@@ -61,8 +61,10 @@ static int init_stub_pte(struct mm_struc
#endif

*pte = mk_pte(virt_to_page(kernel), __pgprot(_PAGE_PRESENT));
- *pte = pte_mkexec(*pte);
- *pte = pte_wrprotect(*pte);
+ /* This is wrong for the code page, but it doesn't matter since the
+ * stub is mapped by hand with the correct permissions.
+ */
+ *pte = pte_mkwrite(*pte);
return(0);

out_pmd:
Index: linux-2.6.16-rc-mm/include/asm-um/pgtable.h
===================================================================
--- linux-2.6.16-rc-mm.orig/include/asm-um/pgtable.h 2006-01-03 17:39:53.000000000 -0500
+++ linux-2.6.16-rc-mm/include/asm-um/pgtable.h 2006-06-26 14:54:42.000000000 -0400
@@ -274,12 +274,6 @@ static inline pte_t pte_mkread(pte_t pte
return(pte_mknewprot(pte));
}

-static inline pte_t pte_mkexec(pte_t pte)
-{
- pte_set_bits(pte, _PAGE_USER);
- return(pte_mknewprot(pte));
-}
-
static inline pte_t pte_mkdirty(pte_t pte)
{
pte_set_bits(pte, _PAGE_DIRTY);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/