* [PATCH 0/2] Remove the no longer used mechanism
@ 2018-10-17 13:15 Zong Li
2018-10-17 13:15 ` [PATCH 1/2] nds32: Remove the redundant assignment Zong Li
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Zong Li @ 2018-10-17 13:15 UTC (permalink / raw)
To: green.hu, deanbo422, linux-kernel; +Cc: greentime, Zong Li
This patchset remove the no longer used mechanism as follows:
1. Reserve the TLB space for UART mapping during booting.
2. Assign a value for UART display when an error ocurred during booting.
Zong Li (2):
nds32: Remove the redundant assignment
nds32: Fill all TLB entries with kernel image mapping
arch/nds32/kernel/head.S | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] nds32: Remove the redundant assignment
2018-10-17 13:15 [PATCH 0/2] Remove the no longer used mechanism Zong Li
@ 2018-10-17 13:15 ` Zong Li
2018-10-17 13:15 ` [PATCH 2/2] nds32: Fill all TLB entries with kernel image mapping Zong Li
2018-10-17 14:42 ` [PATCH 0/2] Remove the no longer used mechanism Greentime Hu
2 siblings, 0 replies; 4+ messages in thread
From: Zong Li @ 2018-10-17 13:15 UTC (permalink / raw)
To: green.hu, deanbo422, linux-kernel; +Cc: greentime, Zong Li, Zong Li
For early version, the value of r2 register was used to display
a character on UART when error occurred. Remove these r2 assignments
because we no longer show the character.
Signed-off-by: Zong Li <zong@andestech.com>
---
arch/nds32/kernel/head.S | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/nds32/kernel/head.S b/arch/nds32/kernel/head.S
index c5fdae1..1ce653d 100644
--- a/arch/nds32/kernel/head.S
+++ b/arch/nds32/kernel/head.S
@@ -130,14 +130,12 @@ _image_size_check:
*
* direct mapping is not supported now.
*/
- li $r2, 't'
beqz $r6, __error ! MMU_CFG.TBW = 0 is direct mappin
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
/* check kernel image size */
la $r3, (_end - PAGE_OFFSET)
- li $r2, 's'
bgt $r3, $r6, __error
li $r2, #(PHYS_OFFSET + TLB_DATA_kernel_text_attr)
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] nds32: Fill all TLB entries with kernel image mapping
2018-10-17 13:15 [PATCH 0/2] Remove the no longer used mechanism Zong Li
2018-10-17 13:15 ` [PATCH 1/2] nds32: Remove the redundant assignment Zong Li
@ 2018-10-17 13:15 ` Zong Li
2018-10-17 14:42 ` [PATCH 0/2] Remove the no longer used mechanism Greentime Hu
2 siblings, 0 replies; 4+ messages in thread
From: Zong Li @ 2018-10-17 13:15 UTC (permalink / raw)
To: green.hu, deanbo422, linux-kernel; +Cc: greentime, Zong Li, Zong Li
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>
---
arch/nds32/kernel/head.S | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/arch/nds32/kernel/head.S b/arch/nds32/kernel/head.S
index 1ce653d..2c8aac6 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
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] Remove the no longer used mechanism
2018-10-17 13:15 [PATCH 0/2] Remove the no longer used mechanism Zong Li
2018-10-17 13:15 ` [PATCH 1/2] nds32: Remove the redundant assignment Zong Li
2018-10-17 13:15 ` [PATCH 2/2] nds32: Fill all TLB entries with kernel image mapping Zong Li
@ 2018-10-17 14:42 ` Greentime Hu
2 siblings, 0 replies; 4+ messages in thread
From: Greentime Hu @ 2018-10-17 14:42 UTC (permalink / raw)
To: Zong Li; +Cc: Vincent Chen, Linux Kernel Mailing List, Greentime
Zong Li <zongbox@gmail.com> 於 2018年10月17日 週三 下午9:17寫道:
>
> This patchset remove the no longer used mechanism as follows:
> 1. Reserve the TLB space for UART mapping during booting.
> 2. Assign a value for UART display when an error ocurred during booting.
>
> Zong Li (2):
> nds32: Remove the redundant assignment
> nds32: Fill all TLB entries with kernel image mapping
>
> arch/nds32/kernel/head.S | 11 +----------
> 1 file changed, 1 insertion(+), 10 deletions(-)
>
Zong, Thank you.
Acked-by: Greentime Hu <greentime@andestech.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-17 14:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-17 13:15 [PATCH 0/2] Remove the no longer used mechanism Zong Li
2018-10-17 13:15 ` [PATCH 1/2] nds32: Remove the redundant assignment Zong Li
2018-10-17 13:15 ` [PATCH 2/2] nds32: Fill all TLB entries with kernel image mapping Zong Li
2018-10-17 14:42 ` [PATCH 0/2] Remove the no longer used mechanism Greentime Hu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.