diff options
author | Suzuki K. Poulose <suzuki.poulose@arm.com> | 2015-10-19 15:19:31 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2015-10-19 18:53:41 +0200 |
commit | 6a3fd4026c0c0ac279265c2a5d228233b5bbd28f (patch) | |
tree | 2f3f50031b81d5b4882c127e960a34ff970be9f7 | |
parent | arm64: Calculate size for idmap_pg_dir at compile time (diff) | |
download | linux-6a3fd4026c0c0ac279265c2a5d228233b5bbd28f.tar.xz linux-6a3fd4026c0c0ac279265c2a5d228233b5bbd28f.zip |
arm64: Handle 4 level page table for swapper
At the moment, we only support maximum of 3-level page table for
swapper. With 48bit VA, 64K has only 3 levels and 4K uses section
mapping. Add support for 4-level page table for swapper, needed
by 16K pages.
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r-- | arch/arm64/kernel/head.S | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index 149fce35fd9a..7ace955b0f31 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -271,7 +271,10 @@ ENDPROC(preserve_boot_args) */ .macro create_pgd_entry, tbl, virt, tmp1, tmp2 create_table_entry \tbl, \virt, PGDIR_SHIFT, PTRS_PER_PGD, \tmp1, \tmp2 -#if SWAPPER_PGTABLE_LEVELS == 3 +#if SWAPPER_PGTABLE_LEVELS > 3 + create_table_entry \tbl, \virt, PUD_SHIFT, PTRS_PER_PUD, \tmp1, \tmp2 +#endif +#if SWAPPER_PGTABLE_LEVELS > 2 create_table_entry \tbl, \virt, SWAPPER_TABLE_SHIFT, PTRS_PER_PTE, \tmp1, \tmp2 #endif .endm |