From 45e98cdb6d365b34b7a2d849e4d8bdc264d8e6e4 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Sun, 15 Jul 2007 23:38:17 -0700 Subject: page table handling cleanup Kill pte_rdprotect(), pte_exprotect(), pte_mkread(), pte_mkexec(), pte_read(), pte_exec(), and pte_user() except where arch-specific code is making use of them. Signed-off-by: Jan Beulich Cc: Andi Kleen Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-sh/pgtable.h | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'include/asm-sh/pgtable.h') diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index 5b523c7e7d9..22efffe4501 100644 --- a/include/asm-sh/pgtable.h +++ b/include/asm-sh/pgtable.h @@ -402,12 +402,8 @@ static inline void set_pte(pte_t *ptep, pte_t pte) #define pte_file(pte) (pte_val(pte) & _PAGE_FILE) #ifdef CONFIG_X2TLB -#define pte_read(pte) ((pte).pte_high & _PAGE_EXT_USER_READ) -#define pte_exec(pte) ((pte).pte_high & _PAGE_EXT_USER_EXEC) #define pte_write(pte) ((pte).pte_high & _PAGE_EXT_USER_WRITE) #else -#define pte_read(pte) (pte_val(pte) & _PAGE_USER) -#define pte_exec(pte) (pte_val(pte) & _PAGE_USER) #define pte_write(pte) (pte_val(pte) & _PAGE_RW) #endif @@ -420,20 +416,12 @@ static inline pte_t pte_##fn(pte_t pte) { pte.pte_##h op; return pte; } * individually toggled (and user permissions are entirely decoupled from * kernel permissions), we attempt to couple them a bit more sanely here. */ -PTE_BIT_FUNC(high, rdprotect, &= ~_PAGE_EXT_USER_READ); -PTE_BIT_FUNC(high, mkread, |= _PAGE_EXT_USER_READ | _PAGE_EXT_KERN_READ); PTE_BIT_FUNC(high, wrprotect, &= ~_PAGE_EXT_USER_WRITE); PTE_BIT_FUNC(high, mkwrite, |= _PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE); -PTE_BIT_FUNC(high, exprotect, &= ~_PAGE_EXT_USER_EXEC); -PTE_BIT_FUNC(high, mkexec, |= _PAGE_EXT_USER_EXEC | _PAGE_EXT_KERN_EXEC); PTE_BIT_FUNC(high, mkhuge, |= _PAGE_SZHUGE); #else -PTE_BIT_FUNC(low, rdprotect, &= ~_PAGE_USER); -PTE_BIT_FUNC(low, mkread, |= _PAGE_USER); PTE_BIT_FUNC(low, wrprotect, &= ~_PAGE_RW); PTE_BIT_FUNC(low, mkwrite, |= _PAGE_RW); -PTE_BIT_FUNC(low, exprotect, &= ~_PAGE_USER); -PTE_BIT_FUNC(low, mkexec, |= _PAGE_USER); PTE_BIT_FUNC(low, mkhuge, |= _PAGE_SZHUGE); #endif -- cgit v1.2.3