All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mips/traps: use CKSEG1ADDR for uncache handler
@ 2010-04-27 20:53 Sebastian Andrzej Siewior
  2010-04-28 15:45 ` Wu Zhangjin
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2010-04-27 20:53 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips

since "MIPS: Calculate proper ebase value for 64-bit kernels" my mips
toy did not boot anymore.
Before that commit we always touched xkphys/shared as ebase and computed
xphsys/unchached for that area. After that commit ebase become 32bit
compat address and convert does not work anymore. So I guess now want to
touch the 32bit compat unmapped & uncached area for this. CKSEG1ADDR
does just in 32bit and 64bit.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
---
 arch/mips/kernel/traps.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 4e00f9b..1b57f18 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1557,12 +1557,7 @@ static char panic_null_cerr[] __cpuinitdata =
 void __cpuinit set_uncached_handler(unsigned long offset, void *addr,
 	unsigned long size)
 {
-#ifdef CONFIG_32BIT
-	unsigned long uncached_ebase = KSEG1ADDR(ebase);
-#endif
-#ifdef CONFIG_64BIT
-	unsigned long uncached_ebase = TO_UNCAC(ebase);
-#endif
+	unsigned long uncached_ebase = CKSEG1ADDR(ebase);
 
 	if (!addr)
 		panic(panic_null_cerr);
-- 
1.6.6.1

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

* Re: [PATCH] mips/traps: use CKSEG1ADDR for uncache handler
  2010-04-27 20:53 [PATCH] mips/traps: use CKSEG1ADDR for uncache handler Sebastian Andrzej Siewior
@ 2010-04-28 15:45 ` Wu Zhangjin
  2010-04-29  7:37   ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 3+ messages in thread
From: Wu Zhangjin @ 2010-04-28 15:45 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior; +Cc: Ralf Baechle, linux-mips

On Tue, 2010-04-27 at 22:53 +0200, Sebastian Andrzej Siewior wrote:
> since "MIPS: Calculate proper ebase value for 64-bit kernels" my mips
> toy did not boot anymore.
> Before that commit we always touched xkphys/shared as ebase and computed
> xphsys/unchached for that area. After that commit ebase become 32bit
> compat address and convert does not work anymore. So I guess now want to
> touch the 32bit compat unmapped & uncached area for this. CKSEG1ADDR
> does just in 32bit and 64bit.
> 

Just tested it in 32bit and 64bit kernel on my YeeLoong netbook, both of
them work well.

BTW: there is another patch[1] sent to this mailing list Yesterday,
differ from your method, it tries to provide a TO_UNCAC() for 32bit
kernel, but seems yours is lighter.

[1] http://patchwork.linux-mips.org/project/linux-mips/list/
  [1/2] MIPS: Fixup and cleanup of TO_PHYS(), TO_CAC(), TO_UNCAC()
  http://patchwork.linux-mips.org/patch/1146/
  [2/2] MIPS: Cleanup of set_uncached_handler()
  http://patchwork.linux-mips.org/patch/1147/

Regards,
	Wu Zhangjin

> Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
> ---
>  arch/mips/kernel/traps.c |    7 +------
>  1 files changed, 1 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
> index 4e00f9b..1b57f18 100644
> --- a/arch/mips/kernel/traps.c
> +++ b/arch/mips/kernel/traps.c
> @@ -1557,12 +1557,7 @@ static char panic_null_cerr[] __cpuinitdata =
>  void __cpuinit set_uncached_handler(unsigned long offset, void *addr,
>  	unsigned long size)
>  {
> -#ifdef CONFIG_32BIT
> -	unsigned long uncached_ebase = KSEG1ADDR(ebase);
> -#endif
> -#ifdef CONFIG_64BIT
> -	unsigned long uncached_ebase = TO_UNCAC(ebase);
> -#endif
> +	unsigned long uncached_ebase = CKSEG1ADDR(ebase);
>  
>  	if (!addr)
>  		panic(panic_null_cerr);

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

* Re: [PATCH] mips/traps: use CKSEG1ADDR for uncache handler
  2010-04-28 15:45 ` Wu Zhangjin
@ 2010-04-29  7:37   ` Sebastian Andrzej Siewior
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2010-04-29  7:37 UTC (permalink / raw)
  To: Wu Zhangjin; +Cc: Ralf Baechle, linux-mips

* Wu Zhangjin | 2010-04-28 23:45:22 [+0800]:

>Just tested it in 32bit and 64bit kernel on my YeeLoong netbook, both of
>them work well.
The interresting part is what happens on IP27.

>BTW: there is another patch[1] sent to this mailing list Yesterday,
>differ from your method, it tries to provide a TO_UNCAC() for 32bit
>kernel, but seems yours is lighter.

I haven't seen much users of TO_UNCAC() in tree so I wasn't sure what
the parameter of TO_UNCAC() can/should be.

>Regards,
>	Wu Zhangjin
>

Sebastian

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

end of thread, other threads:[~2010-04-29  7:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-27 20:53 [PATCH] mips/traps: use CKSEG1ADDR for uncache handler Sebastian Andrzej Siewior
2010-04-28 15:45 ` Wu Zhangjin
2010-04-29  7:37   ` Sebastian Andrzej Siewior

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.