Atsushi Nemoto wrote: > On Tue, 25 Sep 2007 20:13:53 +0200, Martin Michlmayr <tbm@xxxxxxxxxx> 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. >> This still happens with 2.6.22. I cannot boot current git for other >> reasons. > > I think this is solved on current git a few weeks ago by this commit > (not mainlined yet): > >> Subject: [MIPS] Fix CONFIG_BUILD_ELF64 kernels with symbols in CKSEG0. ISTR we kept 2 versions of __pa() for 64 bits kernels for micro-optimization reason. And I think it was a mistake... >> Date: Tue, 11 Sep 2007 11:12:03 +0100 >> Author: Ralf Baechle <ralf@xxxxxxxxxxxxxx> Tue Sep 11 08:50:40 2007 +0100 >> Commit: db423f6e86c3c4c70edf3eaf504e22c467b9f97c >> Gitweb: http://www.linux-mips.org/g/linux/db423f6e >> Branch: master > > It is just one liner and can be backported easily. Hmm I didn't know about this change but I think it's a good one. It basically removes one CONFIG_BUILD_ELF64 dependency in the _code_ which is good. CONFIG_BUILD_ELF64=y makes the kernel code weak since the kernel will crash as soon as a CKSEG0 symbol will be encountered. And ISTR that the bootloader/firmware on some platforms doens't work with 64 bits symbols and objcopy is used after compiling the kernel for these reasons. But I'm really not sure... So IMHO, we should just forget the 4 micro-optimizations associated with CONFIG_BUILD_ELF64 because it doesn't worth the pain it brings. > And The Franck's patchset is already in linux-queue tree of lmo so > should be in 2.6.24. > Ah but as I suggested I think we should get rid of KBUILD_64BIT_SYM32 in the code. This patchset won't work if the kernel symbols are modified latter through objcopy or whatever... What do you think ? Franck