[PATCH 0/7] Re-organize linker layouts

Nicolas Pitre nico at fluxnic.net
Tue Jul 19 14:02:27 EDT 2011


On Tue, 19 Jul 2011, David Brown wrote:

> On Mon, Jul 11, 2011 at 06:14:38PM -0400, Nicolas Pitre wrote:
> 
> > > Anyway, maybe we've been going about this the wrong way. Couldn't we
> > > just make TEXT_OFFSET be 0x00208000 and then make sure to remove the
> > > first 2MB of memory in a machine->reserve() routine if we're MSM?
> > 
> > I think that would certainly be a worthwhile thing to do.  This would 
> > even make ARM_PATCH_PHYS_VIRT more efficient as you won't have to enable 
> > ARM_PATCH_PHYS_VIRT_16BIT anymore.  And even without 
> > ARM_PATCH_PHYS_VIRT, the compiled code for virt_to_phys() and 
> > phys_to_virt() would be more efficient.
> > 
> > Whether or not we would like to still keep the ARM_PATCH_PHYS_VIRT_16BIT 
> > code around is a separate question.
> 
> Wouldn't it still be needed if people want to build an ARM kernel that
> works on both MSM targets and non-MSM targets?

No.  Only MSM requires this right now, and if this requirement is lifted 
then it won't be needed by anyone else.  The other targets are most 
likely not going to care much about the TEXT_OFFSET value used, as long 
as this doesn't conflict with things like ramdisk placement (but if 
someone wishes to have a single kernel configured for multiple targets, 
then that person should be able to move the ramdisk location if needed).

> What about loading the kernel at the next 128MB boundary,
> and coming up with a way to use the 126MB before the kernel for
> allocation.  That might end up being more invasive, though.

Indeed. And many targets don't even have that amount of memory.


Nicolas



More information about the linux-arm-kernel mailing list