mmu.c (e6128a8e523cfa8f46a1501e6432c37523b47bdf) | mmu.c (84b04d3e6bdbc7551e62b75dd97cae4a8bddb1b6) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Based on arch/arm/mm/mmu.c 4 * 5 * Copyright (C) 1995-2005 Russell King 6 * Copyright (C) 2012 ARM Ltd. 7 */ 8 --- 31 unchanged lines hidden (view full) --- 40#include <asm/tlbflush.h> 41#include <asm/pgalloc.h> 42#include <asm/kfence.h> 43 44#define NO_BLOCK_MAPPINGS BIT(0) 45#define NO_CONT_MAPPINGS BIT(1) 46#define NO_EXEC_MAPPINGS BIT(2) /* assumes FEAT_HPDS is not used */ 47 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Based on arch/arm/mm/mmu.c 4 * 5 * Copyright (C) 1995-2005 Russell King 6 * Copyright (C) 2012 ARM Ltd. 7 */ 8 --- 31 unchanged lines hidden (view full) --- 40#include <asm/tlbflush.h> 41#include <asm/pgalloc.h> 42#include <asm/kfence.h> 43 44#define NO_BLOCK_MAPPINGS BIT(0) 45#define NO_CONT_MAPPINGS BIT(1) 46#define NO_EXEC_MAPPINGS BIT(2) /* assumes FEAT_HPDS is not used */ 47 |
48int idmap_t0sz __ro_after_init; 49 | |
50#if VA_BITS > 48 51u64 vabits_actual __ro_after_init = VA_BITS_MIN; 52EXPORT_SYMBOL(vabits_actual); 53#endif 54 55u64 kimage_voffset __ro_after_init; 56EXPORT_SYMBOL(kimage_voffset); 57 --- 730 unchanged lines hidden (view full) --- 788 } 789} 790 791void __init paging_init(void) 792{ 793 pgd_t *pgdp = pgd_set_fixmap(__pa_symbol(swapper_pg_dir)); 794 extern pgd_t init_idmap_pg_dir[]; 795 | 48#if VA_BITS > 48 49u64 vabits_actual __ro_after_init = VA_BITS_MIN; 50EXPORT_SYMBOL(vabits_actual); 51#endif 52 53u64 kimage_voffset __ro_after_init; 54EXPORT_SYMBOL(kimage_voffset); 55 --- 730 unchanged lines hidden (view full) --- 786 } 787} 788 789void __init paging_init(void) 790{ 791 pgd_t *pgdp = pgd_set_fixmap(__pa_symbol(swapper_pg_dir)); 792 extern pgd_t init_idmap_pg_dir[]; 793 |
796 idmap_t0sz = 63UL - __fls(__pa_symbol(_end) | GENMASK(VA_BITS_MIN - 1, 0)); 797 | |
798 map_kernel(pgdp); 799 map_mem(pgdp); 800 801 pgd_clear_fixmap(); 802 803 cpu_replace_ttbr1(lm_alias(swapper_pg_dir), init_idmap_pg_dir); 804 init_mm.pgd = swapper_pg_dir; 805 806 memblock_phys_free(__pa_symbol(init_pg_dir), 807 __pa_symbol(init_pg_end) - __pa_symbol(init_pg_dir)); 808 809 memblock_allow_resize(); 810 811 create_idmap(); | 794 map_kernel(pgdp); 795 map_mem(pgdp); 796 797 pgd_clear_fixmap(); 798 799 cpu_replace_ttbr1(lm_alias(swapper_pg_dir), init_idmap_pg_dir); 800 init_mm.pgd = swapper_pg_dir; 801 802 memblock_phys_free(__pa_symbol(init_pg_dir), 803 __pa_symbol(init_pg_end) - __pa_symbol(init_pg_dir)); 804 805 memblock_allow_resize(); 806 807 create_idmap(); |
812 idmap_t0sz = TCR_T0SZ(IDMAP_VA_BITS); | |
813} 814 815#ifdef CONFIG_MEMORY_HOTPLUG 816static void free_hotplug_page_range(struct page *page, size_t size, 817 struct vmem_altmap *altmap) 818{ 819 if (altmap) { 820 vmem_altmap_free(altmap, size >> PAGE_SHIFT); --- 702 unchanged lines hidden --- | 808} 809 810#ifdef CONFIG_MEMORY_HOTPLUG 811static void free_hotplug_page_range(struct page *page, size_t size, 812 struct vmem_altmap *altmap) 813{ 814 if (altmap) { 815 vmem_altmap_free(altmap, size >> PAGE_SHIFT); --- 702 unchanged lines hidden --- |