]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
nds32: Fix the virtual address may map too much range by tlbop issue.
authorGreentime Hu <greentime@andestech.com>
Mon, 30 Apr 2018 03:21:18 +0000 (11:21 +0800)
committerGreentime Hu <greentime@andestech.com>
Wed, 23 May 2018 05:26:21 +0000 (13:26 +0800)
We use tlbop to map virtual address in the first beginning, however it
may map too much if DRAM size is not that big. We have to invalidate the
mapping when the page table is created.

Signed-off-by: Greentime Hu <greentime@andestech.com>
arch/nds32/kernel/setup.c

index ba910e9e4ecbf58027c68e89b9f2e8cb51010fa3..2f5b2ccebe47166a9863468960f145e9601a9bf4 100644 (file)
@@ -293,6 +293,9 @@ void __init setup_arch(char **cmdline_p)
        /* paging_init() sets up the MMU and marks all pages as reserved */
        paging_init();
 
+       /* invalidate all TLB entries because the new mapping is created */
+       __nds32__tlbop_flua();
+
        /* use generic way to parse */
        parse_early_param();