All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: IP28: Correct IO_BASE in mach-ip28/spaces.h for proper ioremap
@ 2014-08-19  2:55 Joshua Kinard
  2014-08-19  8:00 ` Ralf Baechle
  0 siblings, 1 reply; 5+ messages in thread
From: Joshua Kinard @ 2014-08-19  2:55 UTC (permalink / raw)
  To: Linux MIPS List

On SGI IP28 systems, fix an early crash at boot by setting IO_BASE to a
correct value so that ioremap works properly.

Exception: <vector=normal>
Status register: 0x34004882<CU1,CU0,FR,IM7,IM4,IPL=???,KX,MODE=KERNEL>
Cause register: 0x10<CE=0,EXC=RADE>
Exception PC: 0xa800000020654004, Exception RA: 0xa800000020654c9c
Read address error exception, bad address: 0xdfbdd600

Signed-off-by: Joshua Kinard <kumba@gentoo.org>
Reported-by: Joshua Kinard <kumba@gentoo.org>
Suggested-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Tested-by: Joshua Kinard <kumba@gentoo.org>
Fixes: ed3ce16c3d2b ("Revert "MIPS: make CAC_ADDR and UNCAC_ADDR account for
PHYS_OFFSET"")
---
 arch/mips/include/asm/mach-ip28/spaces.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/mach-ip28/spaces.h
b/arch/mips/include/asm/mach-ip28/spaces.h
index 5d6a764..8c60fb0 100644
--- a/arch/mips/include/asm/mach-ip28/spaces.h
+++ b/arch/mips/include/asm/mach-ip28/spaces.h
@@ -18,7 +18,7 @@
 #define PHYS_OFFSET	_AC(0x20000000, UL)

 #define UNCAC_BASE	_AC(0xc0000000, UL)     /* 0xa0000000 + PHYS_OFFSET */
-#define IO_BASE		UNCAC_BASE
+#define IO_BASE		_AC(0x9000000000000000, UL)

 #include <asm/mach-generic/spaces.h>

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

* Re: [PATCH] MIPS: IP28: Correct IO_BASE in mach-ip28/spaces.h for proper ioremap
  2014-08-19  2:55 [PATCH] MIPS: IP28: Correct IO_BASE in mach-ip28/spaces.h for proper ioremap Joshua Kinard
@ 2014-08-19  8:00 ` Ralf Baechle
  2014-08-19  8:12   ` Ralf Baechle
  2014-08-19 10:05   ` Thomas Bogendoerfer
  0 siblings, 2 replies; 5+ messages in thread
From: Ralf Baechle @ 2014-08-19  8:00 UTC (permalink / raw)
  To: Joshua Kinard, Thomas Bogendoerfer; +Cc: Linux MIPS List

On Mon, Aug 18, 2014 at 10:55:02PM -0400, Joshua Kinard wrote:

> --- a/arch/mips/include/asm/mach-ip28/spaces.h
> +++ b/arch/mips/include/asm/mach-ip28/spaces.h
> @@ -18,7 +18,7 @@
>  #define PHYS_OFFSET	_AC(0x20000000, UL)
> 
>  #define UNCAC_BASE	_AC(0xc0000000, UL)     /* 0xa0000000 + PHYS_OFFSET */
> -#define IO_BASE		UNCAC_BASE
> +#define IO_BASE		_AC(0x9000000000000000, UL)
> 
>  #include <asm/mach-generic/spaces.h>

I think the real culprit is not the definition of IO_BASE but of
UNCAC_BASE.  0xc0000000UL is KSEG2 for a 32 bit kernel - but for a 64 bit
kernel UNCAC_BASE should be defined as _AC(0x9000000000000000, UL).

Which are the defaults in <asm/mach-generic/spaces.h> so just deleting
both UNCAC_BASE and IO_BASE from mach-ip28/spaces.h should fix things?

  Ralf

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

* Re: [PATCH] MIPS: IP28: Correct IO_BASE in mach-ip28/spaces.h for proper ioremap
  2014-08-19  8:00 ` Ralf Baechle
@ 2014-08-19  8:12   ` Ralf Baechle
  2014-08-19 10:05   ` Thomas Bogendoerfer
  1 sibling, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2014-08-19  8:12 UTC (permalink / raw)
  To: Joshua Kinard, Thomas Bogendoerfer; +Cc: Linux MIPS List

On Tue, Aug 19, 2014 at 10:00:34AM +0200, Ralf Baechle wrote:

CAC_BASE is also just redefining the default value and the value for
HIGHMEM_START appears bogus.  Can you just remove the entire file?
That should make the kernel pickup arch/mips/include/asm/mach-generic/spaces.h
with its defaults that should work for IP28 instead.

  Ralf

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

* Re: [PATCH] MIPS: IP28: Correct IO_BASE in mach-ip28/spaces.h for proper ioremap
  2014-08-19  8:00 ` Ralf Baechle
  2014-08-19  8:12   ` Ralf Baechle
@ 2014-08-19 10:05   ` Thomas Bogendoerfer
  2014-08-19 20:01     ` Thomas Bogendoerfer
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Bogendoerfer @ 2014-08-19 10:05 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Joshua Kinard, Linux MIPS List

On Tue, Aug 19, 2014 at 10:00:34AM +0200, Ralf Baechle wrote:
> On Mon, Aug 18, 2014 at 10:55:02PM -0400, Joshua Kinard wrote:
> 
> > --- a/arch/mips/include/asm/mach-ip28/spaces.h
> > +++ b/arch/mips/include/asm/mach-ip28/spaces.h
> > @@ -18,7 +18,7 @@
> >  #define PHYS_OFFSET	_AC(0x20000000, UL)
> > 
> >  #define UNCAC_BASE	_AC(0xc0000000, UL)     /* 0xa0000000 + PHYS_OFFSET */
> > -#define IO_BASE		UNCAC_BASE
> > +#define IO_BASE		_AC(0x9000000000000000, UL)
> > 
> >  #include <asm/mach-generic/spaces.h>
> 
> I think the real culprit is not the definition of IO_BASE but of
> UNCAC_BASE.  0xc0000000UL is KSEG2 for a 32 bit kernel - but for a 64 bit
> kernel UNCAC_BASE should be defined as _AC(0x9000000000000000, UL).

that was my first thought as well. I just wondered whether it's necessary
to reflect PHY_OFFSET != 0... nevertheless UNCAC_BASE is not usuable
for memory access on IP28 at all. At least not without poking at the
memory controller for slower access cycles, which the current kernel
avoids totaly.

> Which are the defaults in <asm/mach-generic/spaces.h> so just deleting
> both UNCAC_BASE and IO_BASE from mach-ip28/spaces.h should fix things?

I'll give a spin later.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

* Re: [PATCH] MIPS: IP28: Correct IO_BASE in mach-ip28/spaces.h for proper ioremap
  2014-08-19 10:05   ` Thomas Bogendoerfer
@ 2014-08-19 20:01     ` Thomas Bogendoerfer
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Bogendoerfer @ 2014-08-19 20:01 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Joshua Kinard, Linux MIPS List

On Tue, Aug 19, 2014 at 12:05:02PM +0200, Thomas Bogendoerfer wrote:
> On Tue, Aug 19, 2014 at 10:00:34AM +0200, Ralf Baechle wrote:
> I'll give a spin later.

after fixing the L1_CACHE_SHIFT my IP28 booted successfull to a shell
prompt.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

end of thread, other threads:[~2014-08-19 20:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-19  2:55 [PATCH] MIPS: IP28: Correct IO_BASE in mach-ip28/spaces.h for proper ioremap Joshua Kinard
2014-08-19  8:00 ` Ralf Baechle
2014-08-19  8:12   ` Ralf Baechle
2014-08-19 10:05   ` Thomas Bogendoerfer
2014-08-19 20:01     ` Thomas Bogendoerfer

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.