Go to the documentation of this file.
12 #ifndef __ASM_SH_PGTABLE_H
13 #define __ASM_SH_PGTABLE_H
16 #include <asm/pgtable-3level.h>
18 #include <asm/pgtable-2level.h>
24 #include <asm/addrspace.h>
25 #include <asm/fixmap.h>
32 #define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
41 #define NEFF_SIGN (1LL << (NEFF - 1))
42 #define NEFF_MASK (-1LL << NEFF)
44 static inline unsigned long long neff_sign_extend(
unsigned long val)
46 unsigned long long extended =
val;
56 #define NPHYS_SIGN (1LL << (NPHYS - 1))
57 #define NPHYS_MASK (-1LL << NPHYS)
59 #define PGDIR_SIZE (1UL << PGDIR_SHIFT)
60 #define PGDIR_MASK (~(PGDIR_SIZE-1))
63 #define PTRS_PER_PTE (PAGE_SIZE / (1 << PTE_MAGNITUDE))
65 #define FIRST_USER_ADDRESS 0
67 #define PHYS_ADDR_MASK29 0x1fffffff
68 #define PHYS_ADDR_MASK32 0xffffffff
70 static inline unsigned long phys_addr_mask(
void)
79 #define PTE_PHYS_MASK (phys_addr_mask() & PAGE_MASK)
80 #define PTE_FLAGS_MASK (~(PTE_PHYS_MASK) << PAGE_SHIFT)
82 #ifdef CONFIG_SUPERH32
83 #define VMALLOC_START (P3SEG)
85 #define VMALLOC_START (0xf0000000)
87 #define VMALLOC_END (FIXADDR_START-2*PAGE_SIZE)
89 #if defined(CONFIG_SUPERH32)
90 #include <asm/pgtable_32.h>
92 #include <asm/pgtable_64.h>
105 #define __P000 PAGE_NONE
106 #define __P001 PAGE_READONLY
107 #define __P010 PAGE_COPY
108 #define __P011 PAGE_COPY
109 #define __P100 PAGE_EXECREAD
110 #define __P101 PAGE_EXECREAD
111 #define __P110 PAGE_COPY
112 #define __P111 PAGE_COPY
114 #define __S000 PAGE_NONE
115 #define __S001 PAGE_READONLY
116 #define __S010 PAGE_WRITEONLY
117 #define __S011 PAGE_SHARED
118 #define __S100 PAGE_EXECREAD
119 #define __S101 PAGE_EXECREAD
120 #define __S110 PAGE_RWX
121 #define __S111 PAGE_RWX
125 #define kern_addr_valid(addr) (1)
127 #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
128 remap_pfn_range(vma, vaddr, pfn, size, prot)
130 #define pte_pfn(x) ((unsigned long)(((x).pte_low >> PAGE_SHIFT)))
159 #define HAVE_ARCH_UNMAPPED_AREA
160 #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
162 #define __HAVE_ARCH_PTE_SPECIAL