[RFC] arm64: defconfig: enable 48-bit VA by default

Arnd Bergmann arnd at arndb.de
Mon Aug 3 01:00:17 PDT 2015


On Sunday 02 August 2015 08:19:07 Ard Biesheuvel wrote:
> >> >>
> >> >> PHYS_OFFSET = PHYS_OFFSET0 = memstart_addr
> >> >> PHYS_OFFSET1 = memstart_addr + 2 GB
> >> >> PHYS_OFFSET2 = memstart_addr + 32 GB
> >> >>
> >> >> and only if the ARM recommended physical memory map is detected (with
> >> >> memstart_addr @ 0x8000_0000), switch to
> >> >>
> >> >> PHYS_OFFSET = PHYS_OFFSET0 = memstart_addr
> >> >> PHYS_OFFSET1 = memstart_addr + 30 GB
> >> >> PHYS_OFFSET2 = memstart_addr + 480 GB
> >> >
> >> > I don't really like such complexity when all you need on arm64 is to
> >> > enable 48-bit VA (though it would be interesting to benchmark it).
> >
> > More importantly, hardwiring this in virt_to_phys() would mean we can
> > no longer run a kernel with this hack turned on with systems that have
> > contiguous memory or any other layout besides the one from the document.
> >
> 
> Well the hack, if enabled, would be turned on dynamically iff the
> exact layout from the recommendation is detected, and the kernel is
> loaded right at the base of DRAM.
> Note that the first layout I presented is effectively the current
> linear mapping, but with three steps.

Ok, I see. So it would work everywhere, at the price of another conditional
for each virt_to_phys, either runtime or by binary patching at boottime.

	Arnd



More information about the linux-arm-kernel mailing list