diff options
Diffstat (limited to 'include/asm-powerpc/pgtable-ppc32.h')
| -rw-r--r-- | include/asm-powerpc/pgtable-ppc32.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h index 2c79f550272b..7c97b5a08d08 100644 --- a/include/asm-powerpc/pgtable-ppc32.h +++ b/include/asm-powerpc/pgtable-ppc32.h | |||
| @@ -98,9 +98,6 @@ extern int icache_44x_need_flush; | |||
| 98 | #define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE) | 98 | #define USER_PTRS_PER_PGD (TASK_SIZE / PGDIR_SIZE) |
| 99 | #define FIRST_USER_ADDRESS 0 | 99 | #define FIRST_USER_ADDRESS 0 |
| 100 | 100 | ||
| 101 | #define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT) | ||
| 102 | #define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS) | ||
| 103 | |||
| 104 | #define pte_ERROR(e) \ | 101 | #define pte_ERROR(e) \ |
| 105 | printk("%s:%d: bad pte %llx.\n", __FILE__, __LINE__, \ | 102 | printk("%s:%d: bad pte %llx.\n", __FILE__, __LINE__, \ |
| 106 | (unsigned long long)pte_val(e)) | 103 | (unsigned long long)pte_val(e)) |
| @@ -420,7 +417,8 @@ extern int icache_44x_need_flush; | |||
| 420 | #define _PAGE_IO (_PAGE_KERNEL | _PAGE_NO_CACHE | _PAGE_GUARDED) | 417 | #define _PAGE_IO (_PAGE_KERNEL | _PAGE_NO_CACHE | _PAGE_GUARDED) |
| 421 | #define _PAGE_RAM (_PAGE_KERNEL | _PAGE_HWEXEC) | 418 | #define _PAGE_RAM (_PAGE_KERNEL | _PAGE_HWEXEC) |
| 422 | 419 | ||
| 423 | #if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) | 420 | #if defined(CONFIG_KGDB) || defined(CONFIG_XMON) || defined(CONFIG_BDI_SWITCH) ||\ |
| 421 | defined(CONFIG_KPROBES) | ||
| 424 | /* We want the debuggers to be able to set breakpoints anywhere, so | 422 | /* We want the debuggers to be able to set breakpoints anywhere, so |
| 425 | * don't write protect the kernel text */ | 423 | * don't write protect the kernel text */ |
| 426 | #define _PAGE_RAM_TEXT _PAGE_RAM | 424 | #define _PAGE_RAM_TEXT _PAGE_RAM |
| @@ -506,6 +504,7 @@ static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } | |||
| 506 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } | 504 | static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } |
| 507 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 505 | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
| 508 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | 506 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
| 507 | static inline int pte_special(pte_t pte) { return 0; } | ||
| 509 | 508 | ||
| 510 | static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; } | 509 | static inline void pte_uncache(pte_t pte) { pte_val(pte) |= _PAGE_NO_CACHE; } |
| 511 | static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; } | 510 | static inline void pte_cache(pte_t pte) { pte_val(pte) &= ~_PAGE_NO_CACHE; } |
| @@ -523,6 +522,8 @@ static inline pte_t pte_mkdirty(pte_t pte) { | |||
| 523 | pte_val(pte) |= _PAGE_DIRTY; return pte; } | 522 | pte_val(pte) |= _PAGE_DIRTY; return pte; } |
| 524 | static inline pte_t pte_mkyoung(pte_t pte) { | 523 | static inline pte_t pte_mkyoung(pte_t pte) { |
| 525 | pte_val(pte) |= _PAGE_ACCESSED; return pte; } | 524 | pte_val(pte) |= _PAGE_ACCESSED; return pte; } |
| 525 | static inline pte_t pte_mkspecial(pte_t pte) { | ||
| 526 | return pte; } | ||
| 526 | 527 | ||
| 527 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 528 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
| 528 | { | 529 | { |
| @@ -692,7 +693,7 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, | |||
| 692 | #define pmd_page_vaddr(pmd) \ | 693 | #define pmd_page_vaddr(pmd) \ |
| 693 | ((unsigned long) (pmd_val(pmd) & PAGE_MASK)) | 694 | ((unsigned long) (pmd_val(pmd) & PAGE_MASK)) |
| 694 | #define pmd_page(pmd) \ | 695 | #define pmd_page(pmd) \ |
| 695 | (mem_map + (__pa(pmd_val(pmd)) >> PAGE_SHIFT)) | 696 | pfn_to_page((__pa(pmd_val(pmd)) >> PAGE_SHIFT)) |
| 696 | #endif | 697 | #endif |
| 697 | 698 | ||
| 698 | /* to find an entry in a kernel page-table-directory */ | 699 | /* to find an entry in a kernel page-table-directory */ |
