Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH 1/2] MIPS: tlbex: Fix typo in r3000 tlb store handler
@ 2013-07-17  9:59 Tony Wu
  2013-07-17 10:01 ` [PATCH 2/2] MIPS: tlbex: Guard tlbmiss_handler_setup_pgd Tony Wu
  2013-07-18  6:41 ` [PATCH 1/2] MIPS: tlbex: Fix typo in r3000 tlb store handler Jayachandran C.
  0 siblings, 2 replies; 5+ messages in thread
From: Tony Wu @ 2013-07-17  9:59 UTC (permalink / raw)
  To: ralf, Jayachandran C; +Cc: linux-mips

Should test against handle_tlbs_end, not handle_tlbs.

Signed-off-by: Tony Wu <tung7970@gmail.com>
Cc: Jayachandran C <jchandra@broadcom.com>
---
 arch/mips/mm/tlbex.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 9ab0f90..605b6fc 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -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);
-- 
1.7.10.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] MIPS: tlbex: Guard tlbmiss_handler_setup_pgd
  2013-07-17  9:59 [PATCH 1/2] MIPS: tlbex: Fix typo in r3000 tlb store handler Tony Wu
@ 2013-07-17 10:01 ` Tony Wu
  2013-07-18  6:53   ` Jayachandran C.
  2013-07-18  6:41 ` [PATCH 1/2] MIPS: tlbex: Fix typo in r3000 tlb store handler Jayachandran C.
  1 sibling, 1 reply; 5+ messages in thread
From: Tony Wu @ 2013-07-17 10:01 UTC (permalink / raw)
  To: ralf, Jayachandran C; +Cc: linux-mips

tlbmiss_handler_setup_pgd* are only referenced when
CONFIG_MIPS_PGD_C0_CONTEXT is defined.

Signed-off-by: Tony Wu <tung7970@gmail.com>
Cc: Jayachandran C <jchandra@broadcom.com>
---
 arch/mips/mm/tlb-funcs.S |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/mips/mm/tlb-funcs.S b/arch/mips/mm/tlb-funcs.S
index 30a494d..79bca31 100644
--- a/arch/mips/mm/tlb-funcs.S
+++ b/arch/mips/mm/tlb-funcs.S
@@ -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
-- 
1.7.10.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] MIPS: tlbex: Fix typo in r3000 tlb store handler
  2013-07-17  9:59 [PATCH 1/2] MIPS: tlbex: Fix typo in r3000 tlb store handler Tony Wu
  2013-07-17 10:01 ` [PATCH 2/2] MIPS: tlbex: Guard tlbmiss_handler_setup_pgd Tony Wu
@ 2013-07-18  6:41 ` Jayachandran C.
  2013-07-18 10:43   ` Tony Wu
  1 sibling, 1 reply; 5+ messages in thread
From: Jayachandran C. @ 2013-07-18  6:41 UTC (permalink / raw)
  To: Tony Wu; +Cc: ralf, linux-mips

On Wed, Jul 17, 2013 at 05:59:47PM +0800, Tony Wu wrote:
> Should test against handle_tlbs_end, not handle_tlbs.
> 
> Signed-off-by: Tony Wu <tung7970@gmail.com>
> Cc: Jayachandran C <jchandra@broadcom.com>
> ---
>  arch/mips/mm/tlbex.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
> index 9ab0f90..605b6fc 100644
> --- a/arch/mips/mm/tlbex.c
> +++ b/arch/mips/mm/tlbex.c
> @@ -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.

Acked-by: Jayachandran C. <jchandra@broadcom.com>

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] MIPS: tlbex: Guard tlbmiss_handler_setup_pgd
  2013-07-17 10:01 ` [PATCH 2/2] MIPS: tlbex: Guard tlbmiss_handler_setup_pgd Tony Wu
@ 2013-07-18  6:53   ` Jayachandran C.
  0 siblings, 0 replies; 5+ messages in thread
From: Jayachandran C. @ 2013-07-18  6:53 UTC (permalink / raw)
  To: Tony Wu; +Cc: ralf, linux-mips

On Wed, Jul 17, 2013 at 06:01:29PM +0800, Tony Wu wrote:
> tlbmiss_handler_setup_pgd* are only referenced when
> CONFIG_MIPS_PGD_C0_CONTEXT is defined.
> 
> Signed-off-by: Tony Wu <tung7970@gmail.com>
> Cc: Jayachandran C <jchandra@broadcom.com>
> ---
>  arch/mips/mm/tlb-funcs.S |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/mips/mm/tlb-funcs.S b/arch/mips/mm/tlb-funcs.S
> index 30a494d..79bca31 100644
> --- a/arch/mips/mm/tlb-funcs.S
> +++ b/arch/mips/mm/tlb-funcs.S
> @@ -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

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] MIPS: tlbex: Fix typo in r3000 tlb store handler
  2013-07-18  6:41 ` [PATCH 1/2] MIPS: tlbex: Fix typo in r3000 tlb store handler Jayachandran C.
@ 2013-07-18 10:43   ` Tony Wu
  0 siblings, 0 replies; 5+ messages in thread
From: Tony Wu @ 2013-07-18 10:43 UTC (permalink / raw)
  To: Jayachandran C.; +Cc: ralf, linux-mips

On Thu, Jul 18, 2013 at 12:11:07PM +0530, Jayachandran C. wrote:
> On Wed, Jul 17, 2013 at 05:59:47PM +0800, Tony Wu wrote:
> > Should test against handle_tlbs_end, not handle_tlbs.
> > 
> > Signed-off-by: Tony Wu <tung7970@gmail.com>
> > Cc: Jayachandran C <jchandra@broadcom.com>
> > ---
> >  arch/mips/mm/tlbex.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
> > index 9ab0f90..605b6fc 100644
> > --- a/arch/mips/mm/tlbex.c
> > +++ b/arch/mips/mm/tlbex.c
> > @@ -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.
> 
> Acked-by: Jayachandran C. <jchandra@broadcom.com>
> 
> 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 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-07-18 15:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-17  9:59 [PATCH 1/2] MIPS: tlbex: Fix typo in r3000 tlb store handler Tony Wu
2013-07-17 10:01 ` [PATCH 2/2] MIPS: tlbex: Guard tlbmiss_handler_setup_pgd Tony Wu
2013-07-18  6:53   ` Jayachandran C.
2013-07-18  6:41 ` [PATCH 1/2] MIPS: tlbex: Fix typo in r3000 tlb store handler Jayachandran C.
2013-07-18 10:43   ` Tony Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox