summaryrefslogtreecommitdiffstats
path: root/arch/nds32/kernel
diff options
context:
space:
mode:
authorZong Li <zongbox@gmail.com>2018-10-17 21:15:52 +0800
committerGreentime Hu <greentime@andestech.com>2018-11-06 18:01:39 +0800
commit8730c178b4208ec52f4c2b381d9a2b685a791b1c (patch)
tree1b871497ab5afd1002c75b93b3669d3eb38ec42a /arch/nds32/kernel
parent2e95c4d672ce6c931951c87b5dbfa4106fd3cae6 (diff)
downloadlinux-8730c178b4208ec52f4c2b381d9a2b685a791b1c.tar.bz2
nds32: Fill all TLB entries with kernel image mapping
We use earlycon replace with early_printk and doesn't use early_io_map() to create UART mapping. It is not necessary to reserve the one way in TLB for now. It didn't make sense if use direct-mapped and reserve one way at the same time. It allow the direct-mapped now. Signed-off-by: Zong Li <zong@andestech.com> Signed-off-by: Greentime Hu <greentime@andestech.com>
Diffstat (limited to 'arch/nds32/kernel')
-rw-r--r--arch/nds32/kernel/head.S9
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/nds32/kernel/head.S b/arch/nds32/kernel/head.S
index 1ce653d35d93..2c8aac6201be 100644
--- a/arch/nds32/kernel/head.S
+++ b/arch/nds32/kernel/head.S
@@ -123,14 +123,7 @@ _image_size_check:
andi $r0, $r0, MMU_CFG_mskTBS
srli $r6, $r6, MMU_CFG_offTBW
srli $r0, $r0, MMU_CFG_offTBS
- /*
- * we just map the kernel to the maximum way - 1 of tlb
- * reserver one way for UART VA mapping
- * it will cause page fault if UART mapping cover the kernel mapping
- *
- * direct mapping is not supported now.
- */
- beqz $r6, __error ! MMU_CFG.TBW = 0 is direct mappin
+ addi $r6, $r6, #0x1 ! MMU_CFG.TBW value -> meaning
addi $r0, $r0, #0x2 ! MMU_CFG.TBS value -> meaning
sll $r0, $r6, $r0 ! entries = k-way * n-set
mul $r6, $r0, $r5 ! max size = entries * page size