[Top] [All Lists]

Re: RFC: Sentosa boot fix

To: "Maciej W. Rozycki" <>
Subject: Re: RFC: Sentosa boot fix
From: "Franck Bui-Huu" <>
Date: Thu, 1 Feb 2007 16:59:49 +0100
Cc: "Atsushi Nemoto" <>,,,
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=CLdcfHwFCg+x8WpPOBm/F7ptKjybQFQ68I+WJBxTiRpNwCDrjb8Dx2heVe1ibXhrI0y7uacHL313AYLthdefEjRxiOtvhuHIQw4+5fyfotBXfDT3sdFoY0yQpYO6FQW4Mx2WK19yI9W3shb7MWBdaT3ze+Hg9iT6cI3cheknRlE=
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <> <> <> <>
Maciej W. Rozycki wrote:
On Thu, 1 Feb 2007, Franck Bui-Huu wrote:

Checking for code correctness and validation of the toolchain (Linux is
one of the few non-PIC users of (n)64) without having to chase hardware
that would support running from XPHYS without serious pain (the firmware
being the usual offender).
This use case was unknown by the time we introduced __pa_page_offset().

 Well, I am afraid it was known well before.  I introduced it first to 2.4

sorry I meant it wasn't for _me_.

 It hurts performance a little bit, so if you can assure the macro shall

Well __pa() is only used in a few places. Futhermore it's used
only during boot mem init so it really shouldn't hurt.

BTW, maybe we can simply remove BUILD_ELF64 at all, since it's only
used to add '-msym32' switch in the makefile. This switch could be
automatically be added by the makefile instead thanks the following

if CONFIG_64BITS and ${load-y} in CKSEG0
   cflags-y += -msym32

what do you think ?

 I do not see enough of justification for -msym32 to be forced.

It gives good default behaviours without both user's intervention or

        if CONFIG_64BITS
                ifndef sym32
                        if load-y in XKPHYS
                                sym32 = ''              [1]
                        elif load-y in CKSEG0
                                sym32 = '-msym32'       [2]
                        if sym32 eq 'yes'
                                sym32 = '-msym32'       [3]
        cflags-y += $(sym32)

[1] since there is no reason to add '-msym32' and it would generate
   wrong code anyways.
[2] since it's used by all platforms to generate smaller code.
   Warn if this option is not supported by the tool chains.
[3] if you really want to generate code loaded in CKSEG0 without
   -msym32 switch you could always do:

                $ make sym32=no

   IMHO, for normal users, this case is probably a configuration
   bug and that's the reason we should request for a user to ask for
   it explicitly.


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