diff options
Diffstat (limited to 'include/asm-powerpc/pgtable.h')
-rw-r--r-- | include/asm-powerpc/pgtable.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/asm-powerpc/pgtable.h b/include/asm-powerpc/pgtable.h index 0303f57366c1..e38931379a72 100644 --- a/include/asm-powerpc/pgtable.h +++ b/include/asm-powerpc/pgtable.h | |||
@@ -1,5 +1,6 @@ | |||
1 | #ifndef _ASM_POWERPC_PGTABLE_H | 1 | #ifndef _ASM_POWERPC_PGTABLE_H |
2 | #define _ASM_POWERPC_PGTABLE_H | 2 | #define _ASM_POWERPC_PGTABLE_H |
3 | #ifdef __KERNEL__ | ||
3 | 4 | ||
4 | #ifndef CONFIG_PPC64 | 5 | #ifndef CONFIG_PPC64 |
5 | #include <asm-ppc/pgtable.h> | 6 | #include <asm-ppc/pgtable.h> |
@@ -58,6 +59,17 @@ struct mm_struct; | |||
58 | #define IMALLOC_END (VMALLOC_START + PGTABLE_RANGE) | 59 | #define IMALLOC_END (VMALLOC_START + PGTABLE_RANGE) |
59 | 60 | ||
60 | /* | 61 | /* |
62 | * Region IDs | ||
63 | */ | ||
64 | #define REGION_SHIFT 60UL | ||
65 | #define REGION_MASK (0xfUL << REGION_SHIFT) | ||
66 | #define REGION_ID(ea) (((unsigned long)(ea)) >> REGION_SHIFT) | ||
67 | |||
68 | #define VMALLOC_REGION_ID (REGION_ID(VMALLOC_START)) | ||
69 | #define KERNEL_REGION_ID (REGION_ID(PAGE_OFFSET)) | ||
70 | #define USER_REGION_ID (0UL) | ||
71 | |||
72 | /* | ||
61 | * Common bits in a linux-style PTE. These match the bits in the | 73 | * Common bits in a linux-style PTE. These match the bits in the |
62 | * (hardware-defined) PowerPC PTE as closely as possible. Additional | 74 | * (hardware-defined) PowerPC PTE as closely as possible. Additional |
63 | * bits may be defined in pgtable-*.h | 75 | * bits may be defined in pgtable-*.h |
@@ -521,4 +533,5 @@ void pgtable_cache_init(void); | |||
521 | #endif /* __ASSEMBLY__ */ | 533 | #endif /* __ASSEMBLY__ */ |
522 | 534 | ||
523 | #endif /* CONFIG_PPC64 */ | 535 | #endif /* CONFIG_PPC64 */ |
536 | #endif /* __KERNEL__ */ | ||
524 | #endif /* _ASM_POWERPC_PGTABLE_H */ | 537 | #endif /* _ASM_POWERPC_PGTABLE_H */ |