diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2014-07-21 15:54:50 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2014-07-23 15:28:15 +0100 |
commit | 383c2799113b00a5f12c820ff0fd3dfca9e5be89 (patch) | |
tree | f2f9788dcbfa62fe6160cae82e67b8d83eca5bc0 /arch/arm64/include/asm/page.h | |
parent | 7078db46215f9137801a122f87ac31c504220a94 (diff) | |
download | op-kernel-dev-383c2799113b00a5f12c820ff0fd3dfca9e5be89.zip op-kernel-dev-383c2799113b00a5f12c820ff0fd3dfca9e5be89.tar.gz |
arm64: Add support for 48-bit VA space with 64KB page configuration
This patch allows support for 3 levels of page tables with 64KB page
configuration allowing 48-bit VA space. The pgd is no longer a full
PAGE_SIZE (PTRS_PER_PGD is 64) and (swapper|idmap)_pg_dir are not fully
populated (pgd_alloc falls back to kzalloc).
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Jungseok Lee <jungseoklee85@gmail.com>
Diffstat (limited to 'arch/arm64/include/asm/page.h')
-rw-r--r-- | arch/arm64/include/asm/page.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/arm64/include/asm/page.h b/arch/arm64/include/asm/page.h index 2502754..7a3f462 100644 --- a/arch/arm64/include/asm/page.h +++ b/arch/arm64/include/asm/page.h @@ -34,17 +34,19 @@ /* * The idmap and swapper page tables need some space reserved in the kernel * image. Both require pgd, pud (4 levels only) and pmd tables to (section) - * map the kernel. The swapper also maps the FDT (see __create_page_tables for - * more information). + * map the kernel. With the 64K page configuration, swapper and idmap need to + * map to pte level. The swapper also maps the FDT (see __create_page_tables + * for more information). */ -#if CONFIG_ARM64_PGTABLE_LEVELS == 4 -#define SWAPPER_DIR_SIZE (3 * PAGE_SIZE) -#define IDMAP_DIR_SIZE (3 * PAGE_SIZE) +#ifdef CONFIG_ARM64_64K_PAGES +#define SWAPPER_PGTABLE_LEVELS (CONFIG_ARM64_PGTABLE_LEVELS) #else -#define SWAPPER_DIR_SIZE (2 * PAGE_SIZE) -#define IDMAP_DIR_SIZE (2 * PAGE_SIZE) +#define SWAPPER_PGTABLE_LEVELS (CONFIG_ARM64_PGTABLE_LEVELS - 1) #endif +#define SWAPPER_DIR_SIZE (SWAPPER_PGTABLE_LEVELS * PAGE_SIZE) +#define IDMAP_DIR_SIZE (SWAPPER_DIR_SIZE) + #ifndef __ASSEMBLY__ #include <asm/pgtable-types.h> |