[Top] [All Lists]

Re: CONFIG_BUILD_ELF64 broken on IP32 since 2.6.20

To: Martin Michlmayr <>
Subject: Re: CONFIG_BUILD_ELF64 broken on IP32 since 2.6.20
From: Franck Bui-Huu <>
Date: Wed, 26 Sep 2007 10:03:44 +0200
Cc:, Franck Bui-Huu <>, Atsushi Nemoto <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=fL8BhB2rH8F8U0OalTgKfLErDqlfe47+CPLOGG0nPOw=; b=aqEpgzbdGZ7y25ELvX9mIkP85b9qajmKR/jRWIVGOGohjzpRqkU9cbnDp3+pciG6YwPURmbQa4TWDjhdZwThRESVrhGT/+1s+U/DaFMXU6yYs0cDIC6qkAlsuW8/5yMAQeCaVsJ9OgeuqtpVgQ3Z0dQbHdzxG6S14L0LttC1Ppc=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=qdr+dXL9v0r0L9AxSj0XsgZBOhlScd3aA+jSHiIUL3FUUDp9brLZuM0GBpskC8bGz8z8P8iXTFer+RBu1t2EVFsTXSpFhqOkX41FbTrVYXWJ7++XR4MHjR7I3w/uA0G9csj86PIuMhr2DeyfybEh7g18qFoYcyfT9Rur33RO8ok=
In-reply-to: <>
Original-recipient: rfc822;
References: <>
User-agent: Thunderbird (X11/20070719)
Martin Michlmayr wrote:
> IP32 kernels that are built with CONFIG_BUILD_ELF64=y only produce an
> exception when booted.  This worked with 2.6.19 and before.  I haven't
> had a chance to dig deep yet but it seems both Franck Bui-Huu and
> Atsushi Nemoto had patches in 2.6.20 that might have caused this.

I'm the culprit ;) but...

> This still happens with 2.6.22.  I cannot boot current git for other
> reasons.
> If anyone has an idea which specific patch might have caused this,
> please let me know.  Otherwise I'll try to find time in the next few
> days to revert various patches.

It's sad to see this issue is still not fixed. Some people complained
about IPxx kernels broken by CONFIG_BUILD_ELF64 config but disappear
once they reported the problem. Anyways, hopefully this time we could
do a better job...

OK, it seems that Ralf's commit
db423f6e86c3c4c70edf3eaf504e22c467b9f97c fixes your issue. But
actually I think it just hides another problem. Because with
CONFIG_BUILD_ELF64=y you claim to run a kernel with 64 bit
symbols. However if the previous commit fixes your issue then it shows
that your kernel handles a symbol linked in CKSEG0 although

To verify this, could you apply the following patch _without_ Ralf's
commit and report back the trace. You may need to enable early printk
to see something and be sure CONFIG_KALLSYMS_ALL is set.


-- 8< --

diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index b92dd8c..a469cf1 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -149,8 +149,17 @@ typedef struct { unsigned long pgprot; } pgprot_t;
     __x < CKSEG0 ? XPHYSADDR(__x) : CPHYSADDR(__x);                    \
-#define __pa(x)                                                                
-    ((unsigned long)(x) - PAGE_OFFSET + PHYS_OFFSET)
+static inline unsigned long __pa(void *p)
+       unsigned long x = (unsigned long)p;
+       if (x > CKSEG0 - 1) {
+               __print_symbol("*** __pa: symbol in CKSEG0 found: %s\n", x);
+               BUG();
+       }
+       return x - PAGE_OFFSET + PHYS_OFFSET;
 #define __va(x)                ((void *)((unsigned long)(x) + PAGE_OFFSET - 
 #define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x),0))

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