diff options
author | Jan Beulich <jbeulich@novell.com> | 2007-07-16 02:38:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 12:05:36 -0400 |
commit | 45e98cdb6d365b34b7a2d849e4d8bdc264d8e6e4 (patch) | |
tree | 172a959293a2c31691a162eca6af131e3ac89da2 /include/asm-sh | |
parent | 98011f569e2ae1e4ae394f6e23faa16676d50de4 (diff) |
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 <jbeulich@novell.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-sh')
-rw-r--r-- | include/asm-sh/pgtable.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index 5b523c7e7d99..22efffe45019 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) | |||
402 | #define pte_file(pte) (pte_val(pte) & _PAGE_FILE) | 402 | #define pte_file(pte) (pte_val(pte) & _PAGE_FILE) |
403 | 403 | ||
404 | #ifdef CONFIG_X2TLB | 404 | #ifdef CONFIG_X2TLB |
405 | #define pte_read(pte) ((pte).pte_high & _PAGE_EXT_USER_READ) | ||
406 | #define pte_exec(pte) ((pte).pte_high & _PAGE_EXT_USER_EXEC) | ||
407 | #define pte_write(pte) ((pte).pte_high & _PAGE_EXT_USER_WRITE) | 405 | #define pte_write(pte) ((pte).pte_high & _PAGE_EXT_USER_WRITE) |
408 | #else | 406 | #else |
409 | #define pte_read(pte) (pte_val(pte) & _PAGE_USER) | ||
410 | #define pte_exec(pte) (pte_val(pte) & _PAGE_USER) | ||
411 | #define pte_write(pte) (pte_val(pte) & _PAGE_RW) | 407 | #define pte_write(pte) (pte_val(pte) & _PAGE_RW) |
412 | #endif | 408 | #endif |
413 | 409 | ||
@@ -420,20 +416,12 @@ static inline pte_t pte_##fn(pte_t pte) { pte.pte_##h op; return pte; } | |||
420 | * individually toggled (and user permissions are entirely decoupled from | 416 | * individually toggled (and user permissions are entirely decoupled from |
421 | * kernel permissions), we attempt to couple them a bit more sanely here. | 417 | * kernel permissions), we attempt to couple them a bit more sanely here. |
422 | */ | 418 | */ |
423 | PTE_BIT_FUNC(high, rdprotect, &= ~_PAGE_EXT_USER_READ); | ||
424 | PTE_BIT_FUNC(high, mkread, |= _PAGE_EXT_USER_READ | _PAGE_EXT_KERN_READ); | ||
425 | PTE_BIT_FUNC(high, wrprotect, &= ~_PAGE_EXT_USER_WRITE); | 419 | PTE_BIT_FUNC(high, wrprotect, &= ~_PAGE_EXT_USER_WRITE); |
426 | PTE_BIT_FUNC(high, mkwrite, |= _PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE); | 420 | PTE_BIT_FUNC(high, mkwrite, |= _PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE); |
427 | PTE_BIT_FUNC(high, exprotect, &= ~_PAGE_EXT_USER_EXEC); | ||
428 | PTE_BIT_FUNC(high, mkexec, |= _PAGE_EXT_USER_EXEC | _PAGE_EXT_KERN_EXEC); | ||
429 | PTE_BIT_FUNC(high, mkhuge, |= _PAGE_SZHUGE); | 421 | PTE_BIT_FUNC(high, mkhuge, |= _PAGE_SZHUGE); |
430 | #else | 422 | #else |
431 | PTE_BIT_FUNC(low, rdprotect, &= ~_PAGE_USER); | ||
432 | PTE_BIT_FUNC(low, mkread, |= _PAGE_USER); | ||
433 | PTE_BIT_FUNC(low, wrprotect, &= ~_PAGE_RW); | 423 | PTE_BIT_FUNC(low, wrprotect, &= ~_PAGE_RW); |
434 | PTE_BIT_FUNC(low, mkwrite, |= _PAGE_RW); | 424 | PTE_BIT_FUNC(low, mkwrite, |= _PAGE_RW); |
435 | PTE_BIT_FUNC(low, exprotect, &= ~_PAGE_USER); | ||
436 | PTE_BIT_FUNC(low, mkexec, |= _PAGE_USER); | ||
437 | PTE_BIT_FUNC(low, mkhuge, |= _PAGE_SZHUGE); | 425 | PTE_BIT_FUNC(low, mkhuge, |= _PAGE_SZHUGE); |
438 | #endif | 426 | #endif |
439 | 427 | ||