[RFC] arm64: defconfig: enable 48-bit VA by default
From: arnd@arndb.de (Arnd Bergmann)
Date: 2015-08-03 08:00:17
On Sunday 02 August 2015 08:19:07 Ard Biesheuvel wrote:
quoted
quoted
quoted
quoted
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 GBI 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