[Top] [All Lists]

Re: IP32 prom crashes due to __pa() funkiness

Subject: Re: IP32 prom crashes due to __pa() funkiness
From: Kumba <>
Date: Sun, 18 Mar 2007 18:44:48 -0400
Cc: Franck Bui-Huu <>, Linux MIPS List <>
In-reply-to: <Pine.LNX.4.58.0703181006450.396@Indigo2.Peter>
Original-recipient: rfc822;
References: <> <> <> <Pine.LNX.4.58.0703181006450.396@Indigo2.Peter>
User-agent: Thunderbird 2.0b2 (Windows/20070116)
peter fuerst wrote:


Did you try to use PHYS_OFFSET > 0 ?  __pa() ist still (as of
d3fbd83ff545e49e2a0a5ca0f00dda4eedaf8be7) defined as (casts omitted):

#define __pa(x) (x - (x < CKSEG0 ? PAGE_OFFSET:CKSEG0) + PHYS_OFFSET)

This gives __pa(CKSEG0) == PHYS_OFFSET, which will never work for
PHYS_OFFSET > 0. A quick fix (assuming this was the cause for failure)
could be:

--- d3fbd83ff545e49e2a0a5ca0f00dda4eedaf8be7/include/asm-mips/page.h    Sat Mar 
10 08:43:17 2007
+++ quickfix/include/asm-mips/page.h    Sun Mar 18 10:24:34 2007
@@ -150,7 +150,7 @@ typedef struct { unsigned long pgprot; }
  * __pa()/__va() should be used only during mem init.
 #if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64)
-#define __pa_page_offset(x)    ((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET : 
+#define __pa_page_offset(x)    ((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET : 
 #define __pa_page_offset(x)    PAGE_OFFSET

Signed-off-by: peter fuerst <>


Of course, "#define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET)" is also needed.

kind regards


Backported the patches that bring in PHYS_OFFSET and tried both with and without Frank's patches to remove CONFIG_BUILD_ELF64 from the Makefile, plus this change, and still no go. W/o CONFIG_BUILD_ELF64, both the vmlinux and vmlinux.32 targets just silently hang. With CONFIG_BUILD_ELF64 in the Makefile, the same Prom crash.


Gentoo/MIPS Team Lead

"Such is oft the course of deeds that move the wheels of the world: small hands do them because they must, while the eyes of the great are elsewhere." --Elrond

<Prev in Thread] Current Thread [Next in Thread>