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
CONFIG_BUILD_ELF64 is set.
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.
thanks,
Franck
-- 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); \
})
#else
-#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;
+}
#endif
#define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET -
PHYS_OFFSET))
#define __pa_symbol(x) __pa(RELOC_HIDE((unsigned long)(x),0))
|