Skip to contentSkip to conversation

MIPS: tlbex: Fix typo in r3000 tlb store handler

PATCH Superseded Tony Wu 2 participants 5 messages Jul 17, 2013 – Jul 18, 2013 MIPS

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Tony Wu

author
#0 lore raw

PATCH 1/2 MIPS: tlbex: Fix typo in r3000 tlb store handler

Should test against handle_tlbs_end, not handle_tlbs.

Cc Jayachandran C <[email protected]>
---
 arch/mips/mm/tlbex.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/mm/tlbex.c +1 -1
index 9ab0f90..605b6fc 100644
@@ -1803,7 +1803,7 @@ static void __cpuinit build_r3000_tlb_store_handler(void)
 	uasm_i_j(&p, (unsigned long)tlb_do_page_fault_1 & 0x0fffffff);
 	uasm_i_nop(&p);
 
-	if (p >= handle_tlbs)
+	if (p >= handle_tlbs_end)
 		panic("TLB store handler fastpath space exceeded");
 
 	uasm_resolve_relocs(relocs, labels);
Signature · 1 line
1.7.10.2
author
#1 lore raw

PATCH 2/2 MIPS: tlbex: Guard tlbmiss_handler_setup_pgd

tlbmiss_handler_setup_pgd* are only referenced when CONFIG_MIPS_PGD_C0_CONTEXT is defined.

Cc Jayachandran C <[email protected]>
---
 arch/mips/mm/tlb-funcs.S |    2 ++
 1 file changed, 2 insertions(+)
arch/mips/mm/tlb-funcs.S +2 -0
index 30a494d..79bca31 100644
@@ -16,10 +16,12 @@
 
 #define FASTPATH_SIZE	128
 
+#ifdef CONFIG_MIPS_PGD_C0_CONTEXT
 LEAF(tlbmiss_handler_setup_pgd)
 	.space		16 * 4
 END(tlbmiss_handler_setup_pgd)
 EXPORT(tlbmiss_handler_setup_pgd_end)
+#endif
 
 LEAF(handle_tlbm)
 	.space		FASTPATH_SIZE * 4
Signature · 1 line
1.7.10.2
#2 lore raw

Re: [PATCH 2/2] MIPS: tlbex: Guard tlbmiss_handler_setup_pgd

Quoted 16 lines · Tony Wu

tlbmiss_handler_setup_pgd* are only referenced when CONFIG_MIPS_PGD_C0_CONTEXT is defined.

Cc Jayachandran C <[email protected]>
---
 arch/mips/mm/tlb-funcs.S |    2 ++
 1 file changed, 2 insertions(+)
arch/mips/mm/tlb-funcs.S +0 -0
index 30a494d..79bca31 100644
@@ -16,10 +16,12 @@
 
 #define FASTPATH_SIZE	128

arch/mips/mm/tlb-funcs.S line 27

Quoted 10 lines
arch/mips/mm/tlb-funcs.S +2 -0
 
+#ifdef CONFIG_MIPS_PGD_C0_CONTEXT
 LEAF(tlbmiss_handler_setup_pgd)
 	.space		16 * 4
 END(tlbmiss_handler_setup_pgd)
 EXPORT(tlbmiss_handler_setup_pgd_end)
+#endif
 
 LEAF(handle_tlbm)
 	.space		FASTPATH_SIZE * 4

There is a patchset planned which uses tlbmiss_handler_setup_pgd when CONFIG_MIPS_PGD_C0_CONTEXT is not defined, but it did not make it into 3.11.

This change can be applied - but if it goes in, I will need to undo this as part of the scratch patchset.

JC.

Acked-by on v1 1/2
#3 lore raw
In reply to Tony Wu
Quoted 13 lines · Tony Wu

Should test against handle_tlbs_end, not handle_tlbs.

Cc Jayachandran C <[email protected]>
---
 arch/mips/mm/tlbex.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/mm/tlbex.c +0 -0
index 9ab0f90..605b6fc 100644

arch/mips/mm/tlbex.c static void __cpuinit build_r3000_tlb_store_handler(void) · line 1809

Quoted 8 lines
arch/mips/mm/tlbex.c +1 -1
@@ -1803,7 +1803,7 @@ static void __cpuinit build_r3000_tlb_store_handler(void)
 	uasm_i_j(&p, (unsigned long)tlb_do_page_fault_1 & 0x0fffffff);
 	uasm_i_nop(&p);
 
-	if (p >= handle_tlbs)
+	if (p >= handle_tlbs_end)
 		panic("TLB store handler fastpath space exceeded");
 
 	uasm_resolve_relocs(relocs, labels);

Thanks for fixing this.

You should add the commit which caused the trouble to the commit message, like:

commit 6ba045f (MIPS: Move generated code to .text for microMIPS) causes a panic at boot.

JC.

author
#4 lore raw
Quoted 27 lines · Jayachandran C.
Quoted 13 lines · Tony Wu

Should test against handle_tlbs_end, not handle_tlbs.

Cc Jayachandran C <[email protected]>
---
 arch/mips/mm/tlbex.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/mm/tlbex.c +0 -0
index 9ab0f90..605b6fc 100644

arch/mips/mm/tlbex.c static void __cpuinit build_r3000_tlb_store_handler(void) · line 1809

Quoted 8 lines
arch/mips/mm/tlbex.c +1 -1
@@ -1803,7 +1803,7 @@ static void __cpuinit build_r3000_tlb_store_handler(void)
 	uasm_i_j(&p, (unsigned long)tlb_do_page_fault_1 & 0x0fffffff);
 	uasm_i_nop(&p);
 
-	if (p >= handle_tlbs)
+	if (p >= handle_tlbs_end)
 		panic("TLB store handler fastpath space exceeded");
 
 	uasm_resolve_relocs(relocs, labels);

Thanks for fixing this.

Quoted 7 lines

You should add the commit which caused the trouble to the commit message, like:

commit 6ba045f (MIPS: Move generated code to .text for microMIPS) causes a panic at boot.

JC.

Thanks for the comment. Will send the updated patch.

Tony