summaryrefslogtreecommitdiffstats
path: root/arch/loongarch/mm/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/loongarch/mm/init.c')
-rw-r--r--arch/loongarch/mm/init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/loongarch/mm/init.c b/arch/loongarch/mm/init.c
index 8a87a482c8f4..188b52bbb254 100644
--- a/arch/loongarch/mm/init.c
+++ b/arch/loongarch/mm/init.c
@@ -201,7 +201,9 @@ pte_t * __init populate_kernel_pte(unsigned long addr)
pte = memblock_alloc(PAGE_SIZE, PAGE_SIZE);
if (!pte)
panic("%s: Failed to allocate memory\n", __func__);
+
pmd_populate_kernel(&init_mm, pmd, pte);
+ kernel_pte_init(pte);
}
return pte_offset_kernel(pmd, addr);