diff options
author | Paul Mackerras <paulus@samba.org> | 2007-10-11 06:37:10 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-10-12 00:05:17 -0400 |
commit | 1189be6508d45183013ddb82b18f4934193de274 (patch) | |
tree | 58924481b4de56699e4a884dce8dc601e71cf7d1 /include/asm-powerpc/page_64.h | |
parent | 287e5d6fcccfa38b953cebe307e1ddfd32363355 (diff) |
[POWERPC] Use 1TB segments
This makes the kernel use 1TB segments for all kernel mappings and for
user addresses of 1TB and above, on machines which support them
(currently POWER5+, POWER6 and PA6T).
We detect that the machine supports 1TB segments by looking at the
ibm,processor-segment-sizes property in the device tree.
We don't currently use 1TB segments for user addresses < 1T, since
that would effectively prevent 32-bit processes from using huge pages
unless we also had a way to revert to using 256MB segments. That
would be possible but would involve extra complications (such as
keeping track of which segment size was used when HPTEs were inserted)
and is not addressed here.
Parts of this patch were originally written by Ben Herrenschmidt.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/page_64.h')
-rw-r--r-- | include/asm-powerpc/page_64.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/asm-powerpc/page_64.h b/include/asm-powerpc/page_64.h index 56a2df0f6836..4ee82c61e4d7 100644 --- a/include/asm-powerpc/page_64.h +++ b/include/asm-powerpc/page_64.h | |||
@@ -26,12 +26,18 @@ | |||
26 | */ | 26 | */ |
27 | #define PAGE_FACTOR (PAGE_SHIFT - HW_PAGE_SHIFT) | 27 | #define PAGE_FACTOR (PAGE_SHIFT - HW_PAGE_SHIFT) |
28 | 28 | ||
29 | /* Segment size */ | 29 | /* Segment size; normal 256M segments */ |
30 | #define SID_SHIFT 28 | 30 | #define SID_SHIFT 28 |
31 | #define SID_MASK ASM_CONST(0xfffffffff) | 31 | #define SID_MASK ASM_CONST(0xfffffffff) |
32 | #define ESID_MASK 0xfffffffff0000000UL | 32 | #define ESID_MASK 0xfffffffff0000000UL |
33 | #define GET_ESID(x) (((x) >> SID_SHIFT) & SID_MASK) | 33 | #define GET_ESID(x) (((x) >> SID_SHIFT) & SID_MASK) |
34 | 34 | ||
35 | /* 1T segments */ | ||
36 | #define SID_SHIFT_1T 40 | ||
37 | #define SID_MASK_1T 0xffffffUL | ||
38 | #define ESID_MASK_1T 0xffffff0000000000UL | ||
39 | #define GET_ESID_1T(x) (((x) >> SID_SHIFT_1T) & SID_MASK_1T) | ||
40 | |||
35 | #ifndef __ASSEMBLY__ | 41 | #ifndef __ASSEMBLY__ |
36 | #include <asm/cache.h> | 42 | #include <asm/cache.h> |
37 | 43 | ||