From: Russell King Date: Tue, 4 Jan 2011 19:04:00 +0000 (+0000) Subject: ARM: P2V: eliminate head.S use of PHYS_OFFSET for !XIP_KERNEL X-Git-Tag: v2.6.39-rc1~463^2^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72a20e22f49e2dad3180c23980a9df1c63faab0a;p=pandora-kernel.git ARM: P2V: eliminate head.S use of PHYS_OFFSET for !XIP_KERNEL head.S makes use of PHYS_OFFSET. When it becomes a variable, the assembler won't understand this. Compute PHYS_OFFSET by the following method. This code is linked at its virtual address, but run at before the MMU is enabled, so at his physical address. 1: .long . .long PAGE_OFFSET adr r0, 1b @ r0 = physical ',' ldmia r0, {r1, r2} @ r1 = virtual '.', r2 = PAGE_OFFSET sub r1, r0, r1 @ r1 = physical-virtual add r2, r2, r1 @ r2 = PAGE_OFFSET + physical-virtual @ := PHYS_OFFSET. Switch XIP users of PHYS_OFFSET to use PLAT_PHYS_OFFSET - we can't use this method for XIP kernels as the code doesn't execute in RAM. Tested-by: Tony Lindgren Reviewed-by: Nicolas Pitre Signed-off-by: Russell King --- Reading git-diff-tree failed