Re: RFC: Sentosa boot fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
condition:

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

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
configuration:

	if CONFIG_64BITS
		ifndef sym32
			if load-y in XKPHYS
				sym32 = ''		[1]
			elif load-y in CKSEG0
				sym32 = '-msym32'	[2]
		else
			if sym32 eq 'yes'
				sym32 = '-msym32'	[3]
		endef
	fi
	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.

--
              Franck


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux