Skip to content
Permalink
Browse files
arch: arm64: have memblocks out of kernel text use section map
By comparing the swapper_pg_dir with k54 and previous versions,we find
that the linear mappings within which the addr is out of kernel text section
will use the smallest pte. It should arise for the sake of rodata_full, which
set all memblock use NO_CONT_MAPPINGS.

Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
  • Loading branch information
Zhaoyang Huang authored and intel-lab-lkp committed Nov 12, 2021
1 parent c7c386f commit 1e24a50ddba38b8bed8d75bc2b788da88b354522
Showing 1 changed file with 10 additions and 1 deletion.
@@ -253,14 +253,24 @@ static void init_pmd(pud_t *pudp, unsigned long addr, unsigned long end,
pmd_clear_fixmap();
}

static bool crash_mem_map __initdata;

static void alloc_init_cont_pmd(pud_t *pudp, unsigned long addr,
unsigned long end, phys_addr_t phys,
pgprot_t prot,
phys_addr_t (*pgtable_alloc)(int), int flags)
{
unsigned long next;
pud_t pud = READ_ONCE(*pudp);
unsigned long len = end - addr;
phys_addr_t kernel_start = __pa_symbol(_stext);
phys_addr_t kernel_end = __pa_symbol(__init_begin);

if (debug_pagealloc_enabled() || crash_mem_map || IS_ENABLED(CONFIG_KFENCE))
;
else if (phys > kernel_end || phys + len < kernel_start) {
flags &= ~(NO_BLOCK_MAPPINGS | NO_CONT_MAPPINGS);
}
/*
* Check for initial section mappings in the pgd/pud.
*/
@@ -484,7 +494,6 @@ void __init mark_linear_text_alias_ro(void)
PAGE_KERNEL_RO);
}

static bool crash_mem_map __initdata;

static int __init enable_crash_mem_map(char *arg)
{

0 comments on commit 1e24a50

Please sign in to comment.