diff options
author | Nicolas Pitre <nico@cam.org> | 2005-10-29 21:44:56 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-10-29 21:44:56 +0100 |
commit | 37d07b72ef58f2d5ec7701ab75084fbeee0e503e (patch) | |
tree | da42fbad5b8ac6c79a258a46aff5f5d338ac138f /include/asm-arm | |
parent | f09b99799991c7c3ba441162406247f5df077322 (diff) | |
download | linux-3.10-37d07b72ef58f2d5ec7701ab75084fbeee0e503e.tar.gz linux-3.10-37d07b72ef58f2d5ec7701ab75084fbeee0e503e.tar.bz2 linux-3.10-37d07b72ef58f2d5ec7701ab75084fbeee0e503e.zip |
[ARM] 3061/1: cleanup the XIP link address mess
Patch from Nicolas Pitre
Since vmlinux.lds.S is preprocessed, we can use the defines already
present in asm/memory.h (allowed by patch #3060) for the XIP kernel link
address instead of relying on a duplicated Makefile hardcoded value, and
also get rid of its dependency on awk to handle it at the same time.
While at it let's clean XIP stuff even further and make things clearer
in head.S with a nice code reduction.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm')
-rw-r--r-- | include/asm-arm/memory.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index bee10fcf7e8..a547ee598c6 100644 --- a/include/asm-arm/memory.h +++ b/include/asm-arm/memory.h @@ -68,6 +68,13 @@ #error Top of user space clashes with start of module space #endif +/* + * The XIP kernel gets mapped at the bottom of the module vm area. + * Since we use sections to map it, this macro replaces the physical address + * with its virtual address while keeping offset from the base section. + */ +#define XIP_VIRT_ADDR(physaddr) (MODULE_START + ((physaddr) & 0x000fffff)) + #ifndef __ASSEMBLY__ /* |