diff options
author | Matt Fleming <matt@console-pimps.org> | 2009-12-13 09:38:50 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-12-17 00:31:20 -0500 |
commit | 5d9b4b19f118abfb75e352841f7bf74580d7e427 (patch) | |
tree | 5b9d0ec51bd12165d842d1d8a208e7568971757b /arch/sh/include/asm/pgtable.h | |
parent | b73c806341cfc7492ede6a2ce713cb579547d0ab (diff) |
sh: Definitions for 3-level page table layout
If using 64-bit PTEs and 4K pages then each page table has 512 entries
(as opposed to 1024 entries with 32-bit PTEs). Unlike MIPS, SH follows
the convention that all structures in the page table (pgd_t, pmd_t,
pgprot_t, etc) must be the same size. Therefore, 64-bit PTEs require
64-bit PGD entries, etc. Using 2-levels of page tables and 64-bit PTEs
it is only possible to map 1GB of virtual address space.
In order to map all 4GB of virtual address space we need to adopt a
3-level page table layout. This actually works out better for
CONFIG_SUPERH32 because we only waste 2 PGD entries on the P1 and P2
areas (which are untranslated) instead of 256.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/pgtable.h')
-rw-r--r-- | arch/sh/include/asm/pgtable.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sh/include/asm/pgtable.h b/arch/sh/include/asm/pgtable.h index 9a0f66c1134c..9effcc3b0d10 100644 --- a/arch/sh/include/asm/pgtable.h +++ b/arch/sh/include/asm/pgtable.h | |||
@@ -12,7 +12,11 @@ | |||
12 | #ifndef __ASM_SH_PGTABLE_H | 12 | #ifndef __ASM_SH_PGTABLE_H |
13 | #define __ASM_SH_PGTABLE_H | 13 | #define __ASM_SH_PGTABLE_H |
14 | 14 | ||
15 | #ifdef CONFIG_PGTABLE_LEVELS_3 | ||
16 | #include <asm/pgtable_pmd.h> | ||
17 | #else | ||
15 | #include <asm/pgtable_nopmd.h> | 18 | #include <asm/pgtable_nopmd.h> |
19 | #endif | ||
16 | #include <asm/page.h> | 20 | #include <asm/page.h> |
17 | 21 | ||
18 | #ifndef __ASSEMBLY__ | 22 | #ifndef __ASSEMBLY__ |