aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/page_64.h10
-rw-r--r--include/asm-powerpc/pgtable.h11
2 files changed, 11 insertions, 10 deletions
diff --git a/include/asm-powerpc/page_64.h b/include/asm-powerpc/page_64.h
index 6642c0125001..8a07a93b0321 100644
--- a/include/asm-powerpc/page_64.h
+++ b/include/asm-powerpc/page_64.h
@@ -25,16 +25,6 @@
25 */ 25 */
26#define PAGE_FACTOR (PAGE_SHIFT - HW_PAGE_SHIFT) 26#define PAGE_FACTOR (PAGE_SHIFT - HW_PAGE_SHIFT)
27 27
28#define REGION_SIZE 4UL
29#define REGION_SHIFT 60UL
30#define REGION_MASK (((1UL<<REGION_SIZE)-1UL)<<REGION_SHIFT)
31
32#define VMALLOCBASE ASM_CONST(0xD000000000000000)
33#define VMALLOC_REGION_ID (VMALLOCBASE >> REGION_SHIFT)
34#define KERNEL_REGION_ID (KERNELBASE >> REGION_SHIFT)
35#define USER_REGION_ID (0UL)
36#define REGION_ID(ea) (((unsigned long)(ea)) >> REGION_SHIFT)
37
38/* Segment size */ 28/* Segment size */
39#define SID_SHIFT 28 29#define SID_SHIFT 28
40#define SID_MASK 0xfffffffffUL 30#define SID_MASK 0xfffffffffUL
diff --git a/include/asm-powerpc/pgtable.h b/include/asm-powerpc/pgtable.h
index 0303f57366c1..3518adb2cc18 100644
--- a/include/asm-powerpc/pgtable.h
+++ b/include/asm-powerpc/pgtable.h
@@ -58,6 +58,17 @@ struct mm_struct;
58#define IMALLOC_END (VMALLOC_START + PGTABLE_RANGE) 58#define IMALLOC_END (VMALLOC_START + PGTABLE_RANGE)
59 59
60/* 60/*
61 * Region IDs
62 */
63#define REGION_SHIFT 60UL
64#define REGION_MASK (0xfUL << REGION_SHIFT)
65#define REGION_ID(ea) (((unsigned long)(ea)) >> REGION_SHIFT)
66
67#define VMALLOC_REGION_ID (REGION_ID(VMALLOC_START))
68#define KERNEL_REGION_ID (REGION_ID(PAGE_OFFSET))
69#define USER_REGION_ID (0UL)
70
71/*
61 * Common bits in a linux-style PTE. These match the bits in the 72 * Common bits in a linux-style PTE. These match the bits in the
62 * (hardware-defined) PowerPC PTE as closely as possible. Additional 73 * (hardware-defined) PowerPC PTE as closely as possible. Additional
63 * bits may be defined in pgtable-*.h 74 * bits may be defined in pgtable-*.h