[Top] [All Lists]

Re: IP32 prom crashes due to __pa() funkiness

To: Kumba <>
Subject: Re: IP32 prom crashes due to __pa() funkiness
From: "Franck Bui-Huu" <>
Date: Thu, 1 Mar 2007 10:39:08 +0100
Cc: "Linux MIPS List" <>
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed;; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qxorT7Qdq/auhwfhrNAmnMiemK6JWTnRASDei26Lsa2pF3M3NBTDhE7lBLdFmUyksaRjPaGVNztmEMi+VQel7iBnAXC/xlNeAJPGDLRTv7xZ7+y2RXwWrdPC0P/5rHmVhfdsH57cUUc2DXeB1LpMUkXvMrc4JlqNe+NmwizyIq4=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YtGWX43mxixUhBLw6pNj1dli56pys95vfDucLR27hvP9aaM4Tz9OBrQZHB8ellWeKS85azYSM3PX7W4xIYZY4qz5xVqy0hphsiYBbED8Lt1Ot4s8gQELl+vuMb2FdILl16Ivb/ARKE4vCsKz9JHpk/xCuQ7SeWZJp8DgQhzj5jI=
In-reply-to: <>
Original-recipient: rfc822;
References: <>

Kumba wrote:

Initially, booting a straight git checkout on an IP32 will cause it to
prom crash, usually somewhere in between init_bootmem() and
init_bootmem_core().  I bisected git to trace this back to one of the
inital __pa() introduction patches from commit d4df6d4 (get ride of
CPHYSADDR()).  It actually appears that the actual commit that broke
things was 620a480 (Make __pa() aware of XKPHYS/CKSEG0 address mix for
64 bit kernels).

The [short-term] fix highlighted by Ilya is to make __pa()
unconditionally be defined to "((unsigned long)(x) < CKSEG0 ?
PAGE_OFFSET : CKSEG0)"; Discovered by building IP32 with

Well, it means that you previously used CONFIG_BUILD_ELF64=y (this
implied that PAGE_OFFSET is in XKPHYS) whereas your kernel has CKSEG
load address (symbols need PAGE_OFFSET in CKSEG for address

So the question is why can't you use CONFIG_BUILD_ELF64=n (and
reagarding the current definition of CONFIG_BUILD_ELF64).

Normally, this shouldn't be possible, as CONFIG_BUILD_ELF64=n was
originally only allowed by using the old o64 hack, which has
subsequently died and been replaced with the newer -msym32 form.  As far
as I know, CONFIG_BUILD_ELF64 is apparently supposed to be removed at
some point in the future, since I believe it existed only for quirky

It makes me think that I posted a patch for that a couple of weeks ago:

Basically this patch removes CONFIG_BUILD_ELF64 and makes Kbuild to use
'-msym32' switch if you really need it. Kbuild makes its choice according
the load address of your kernel image.

Could you give it a try ? This patch was based on 2.6.20 but it should
apply fine on a 2.6.21-rc[12].

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