microblaze: Create the LOAD_OFFSET macro used to compute VMA vs LMA offsets
authorJohn Williams <john.williams@petalogix.com>
Sun, 21 Jun 2009 23:38:13 +0000 (01:38 +0200)
committerMichal Simek <monstr@monstr.eu>
Tue, 22 Sep 2009 08:10:06 +0000 (10:10 +0200)
LOAD_OFFSET is the offset between the physical load address and the kernel's
virtual address.  It will be used in the upcoming commit to vmlinux.ld.S to
make sure that the LMAs of sections in vmlinux are correct.

Signed-off-by: John Williams <john.williams@petalogix.com>
arch/microblaze/include/asm/page.h

index 72aceae..880c988 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <linux/pfn.h>
 #include <asm/setup.h>
+#include <asm/asm-compat.h>
 #include <linux/const.h>
 
 #ifdef __KERNEL__
@@ -26,6 +27,8 @@
 #define PAGE_SIZE      (_AC(1, UL) << PAGE_SHIFT)
 #define PAGE_MASK      (~(PAGE_SIZE-1))
 
+#define LOAD_OFFSET    ASM_CONST((CONFIG_KERNEL_START-CONFIG_KERNEL_BASE_ADDR))
+
 #ifndef __ASSEMBLY__
 
 #define PAGE_UP(addr)  (((addr)+((PAGE_SIZE)-1))&(~((PAGE_SIZE)-1)))