aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-12-11 17:29:16 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-12-11 17:29:16 -0500
commitf06b97ffd1ed7a96d5022d52f795fba8483afb75 (patch)
tree9240f07751edf59f666066cca098ef51053be016 /arch
parentbca0b8e75f6b7cf52cf52c967286b72d84f9b37e (diff)
[ARM] Clean up KERNEL_RAM_ADDR
Clean up the KERNEL_RAM_ADDR stuff in arch/arm/kernel/head.S to make it clearer what's referring to what. In doing so, remove the usage of __virt_to_phys(), which is not guaranteed to be something that the assembler can parse. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/head.S19
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index bda0748ffb00..d994561816a1 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -22,30 +22,31 @@
22#include <asm/thread_info.h> 22#include <asm/thread_info.h>
23#include <asm/system.h> 23#include <asm/system.h>
24 24
25#define KERNEL_RAM_ADDR (PAGE_OFFSET + TEXT_OFFSET) 25#define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET)
26#define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET)
26 27
27/* 28/*
28 * swapper_pg_dir is the virtual address of the initial page table. 29 * swapper_pg_dir is the virtual address of the initial page table.
29 * We place the page tables 16K below KERNEL_RAM_ADDR. Therefore, we must 30 * We place the page tables 16K below KERNEL_RAM_VADDR. Therefore, we must
30 * make sure that KERNEL_RAM_ADDR is correctly set. Currently, we expect 31 * make sure that KERNEL_RAM_VADDR is correctly set. Currently, we expect
31 * the least significant 16 bits to be 0x8000, but we could probably 32 * the least significant 16 bits to be 0x8000, but we could probably
32 * relax this restriction to KERNEL_RAM_ADDR >= PAGE_OFFSET + 0x4000. 33 * relax this restriction to KERNEL_RAM_VADDR >= PAGE_OFFSET + 0x4000.
33 */ 34 */
34#if (KERNEL_RAM_ADDR & 0xffff) != 0x8000 35#if (KERNEL_RAM_VADDR & 0xffff) != 0x8000
35#error KERNEL_RAM_ADDR must start at 0xXXXX8000 36#error KERNEL_RAM_VADDR must start at 0xXXXX8000
36#endif 37#endif
37 38
38 .globl swapper_pg_dir 39 .globl swapper_pg_dir
39 .equ swapper_pg_dir, KERNEL_RAM_ADDR - 0x4000 40 .equ swapper_pg_dir, KERNEL_RAM_VADDR - 0x4000
40 41
41 .macro pgtbl, rd 42 .macro pgtbl, rd
42 ldr \rd, =(__virt_to_phys(KERNEL_RAM_ADDR - 0x4000)) 43 ldr \rd, =(KERNEL_RAM_PADDR - 0x4000)
43 .endm 44 .endm
44 45
45#ifdef CONFIG_XIP_KERNEL 46#ifdef CONFIG_XIP_KERNEL
46#define TEXTADDR XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR) 47#define TEXTADDR XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR)
47#else 48#else
48#define TEXTADDR KERNEL_RAM_ADDR 49#define TEXTADDR KERNEL_RAM_VADDR
49#endif 50#endif
50 51
51/* 52/*