diff options
Diffstat (limited to 'arch/arm64/mm/mmu.c')
-rw-r--r-- | arch/arm64/mm/mmu.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 6894ef3e6234..f4f8b500f74c 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c | |||
@@ -202,7 +202,7 @@ static void __init alloc_init_pmd(pud_t *pud, unsigned long addr, | |||
202 | } | 202 | } |
203 | 203 | ||
204 | static void __init alloc_init_pud(pgd_t *pgd, unsigned long addr, | 204 | static void __init alloc_init_pud(pgd_t *pgd, unsigned long addr, |
205 | unsigned long end, unsigned long phys, | 205 | unsigned long end, phys_addr_t phys, |
206 | int map_io) | 206 | int map_io) |
207 | { | 207 | { |
208 | pud_t *pud; | 208 | pud_t *pud; |
@@ -297,11 +297,15 @@ static void __init map_mem(void) | |||
297 | * create_mapping requires puds, pmds and ptes to be allocated from | 297 | * create_mapping requires puds, pmds and ptes to be allocated from |
298 | * memory addressable from the initial direct kernel mapping. | 298 | * memory addressable from the initial direct kernel mapping. |
299 | * | 299 | * |
300 | * The initial direct kernel mapping, located at swapper_pg_dir, | 300 | * The initial direct kernel mapping, located at swapper_pg_dir, gives |
301 | * gives us PUD_SIZE memory starting from PHYS_OFFSET (which must be | 301 | * us PUD_SIZE (4K pages) or PMD_SIZE (64K pages) memory starting from |
302 | * aligned to 2MB as per Documentation/arm64/booting.txt). | 302 | * PHYS_OFFSET (which must be aligned to 2MB as per |
303 | * Documentation/arm64/booting.txt). | ||
303 | */ | 304 | */ |
304 | limit = PHYS_OFFSET + PUD_SIZE; | 305 | if (IS_ENABLED(CONFIG_ARM64_64K_PAGES)) |
306 | limit = PHYS_OFFSET + PMD_SIZE; | ||
307 | else | ||
308 | limit = PHYS_OFFSET + PUD_SIZE; | ||
305 | memblock_set_current_limit(limit); | 309 | memblock_set_current_limit(limit); |
306 | 310 | ||
307 | /* map all the memory banks */ | 311 | /* map all the memory banks */ |