Go to the documentation of this file. 1 #ifndef _ASM_POWERPC_PAGE_64_H
2 #define _ASM_POWERPC_PAGE_64_H
18 #define HW_PAGE_SHIFT 12
19 #define HW_PAGE_SIZE (ASM_CONST(1) << HW_PAGE_SHIFT)
20 #define HW_PAGE_MASK (~(HW_PAGE_SIZE-1))
26 #define PAGE_FACTOR (PAGE_SHIFT - HW_PAGE_SHIFT)
30 #define SID_MASK ASM_CONST(0xfffffffff)
31 #define ESID_MASK 0xfffffffff0000000UL
32 #define GET_ESID(x) (((x) >> SID_SHIFT) & SID_MASK)
35 #define SID_SHIFT_1T 40
36 #define SID_MASK_1T 0xffffffUL
37 #define ESID_MASK_1T 0xffffff0000000000UL
38 #define GET_ESID_1T(x) (((x) >> SID_SHIFT_1T) & SID_MASK_1T)
41 #include <asm/cache.h>
47 unsigned long lines, line_size;
53 "mtctr %1 # clear_page\n\
58 :
"r" (lines),
"0" (addr),
"r" (line_size)
69 #ifdef CONFIG_PPC_MM_SLICES
71 #define SLICE_LOW_SHIFT 28
72 #define SLICE_HIGH_SHIFT 40
74 #define SLICE_LOW_TOP (0x100000000ul)
75 #define SLICE_NUM_LOW (SLICE_LOW_TOP >> SLICE_LOW_SHIFT)
76 #define SLICE_NUM_HIGH (PGTABLE_RANGE >> SLICE_HIGH_SHIFT)
78 #define GET_LOW_SLICE_INDEX(addr) ((addr) >> SLICE_LOW_SHIFT)
79 #define GET_HIGH_SLICE_INDEX(addr) ((addr) >> SLICE_HIGH_SHIFT)
87 #define SLICE_MASK_SIZE 8
108 extern void slice_init_context(
struct mm_struct *mm,
unsigned int psize);
111 unsigned long len,
unsigned int psize);
113 #define slice_mm_new_context(mm) ((mm)->context.id == MMU_NO_CONTEXT)
118 #ifdef CONFIG_PPC_STD_MMU_64
119 #define get_slice_psize(mm, addr) ((mm)->context.user_psize)
120 #define slice_set_user_psize(mm, psize) \
122 (mm)->context.user_psize = (psize); \
123 (mm)->context.sllp = SLB_VSID_USER | mmu_psize_defs[(psize)].sllp; \
126 #ifdef CONFIG_PPC_64K_PAGES
127 #define get_slice_psize(mm, addr) MMU_PAGE_64K
129 #define get_slice_psize(mm, addr) MMU_PAGE_4K
131 #define slice_set_user_psize(mm, psize) do { BUG(); } while(0)
134 #define slice_set_range_psize(mm, start, len, psize) \
135 slice_set_user_psize((mm), (psize))
136 #define slice_mm_new_context(mm) 1
139 #ifdef CONFIG_HUGETLB_PAGE
141 #ifdef CONFIG_PPC_MM_SLICES
142 #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
147 #define VM_DATA_DEFAULT_FLAGS \
149 VM_DATA_DEFAULT_FLAGS32 : VM_DATA_DEFAULT_FLAGS64)
157 #define VM_STACK_DEFAULT_FLAGS32 (VM_READ | VM_WRITE | VM_EXEC | \
158 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
160 #define VM_STACK_DEFAULT_FLAGS64 (VM_READ | VM_WRITE | \
161 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
163 #define VM_STACK_DEFAULT_FLAGS \
165 VM_STACK_DEFAULT_FLAGS32 : VM_STACK_DEFAULT_FLAGS64)