aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-01-04 14:03:16 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-02-17 18:27:30 -0500
commitb75c178afaa975896e894bb2b6951dc4cd43c977 (patch)
treee3011acbb5c185497e9d72d406b69e5cc20debd5 /arch/arm
parentf4117ac9e237b74afdf5e001d5ea26a4d15e9847 (diff)
ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
As PHYS_OFFSET will be becoming a variable, we can't have it used in initializers nor assembly code. Replace those in generic code with a run-time initialization. Replace those in platform code using the individual platform specific PLAT_PHYS_OFFSET. Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Acked-by: David Brown <davidb@codeaurora.org> Acked-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/kernel/setup.c4
-rw-r--r--arch/arm/mach-msm/board-msm7x27.c8
-rw-r--r--arch/arm/mach-msm/board-msm7x30.c6
-rw-r--r--arch/arm/mach-msm/board-qsd8x50.c4
-rw-r--r--arch/arm/mach-msm/board-sapphire.c2
-rw-r--r--arch/arm/mach-pxa/balloon3.c2
-rw-r--r--arch/arm/mach-realview/realview_eb.c2
-rw-r--r--arch/arm/mach-realview/realview_pb1176.c2
-rw-r--r--arch/arm/mach-realview/realview_pb11mp.c2
-rw-r--r--arch/arm/mach-realview/realview_pba8.c2
-rw-r--r--arch/arm/mach-realview/realview_pbx.c2
-rw-r--r--arch/arm/mach-s5pv210/sleep.S2
-rw-r--r--arch/arm/mach-tcc8k/board-tcc8000-sdk.c2
-rw-r--r--arch/arm/mach-vexpress/ct-ca9x4.c2
-rw-r--r--arch/arm/plat-omap/include/plat/serial.h2
15 files changed, 23 insertions, 21 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 78678b07901c..056bf1878f8a 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -740,7 +740,7 @@ static struct init_tags {
740 { tag_size(tag_core), ATAG_CORE }, 740 { tag_size(tag_core), ATAG_CORE },
741 { 1, PAGE_SIZE, 0xff }, 741 { 1, PAGE_SIZE, 0xff },
742 { tag_size(tag_mem32), ATAG_MEM }, 742 { tag_size(tag_mem32), ATAG_MEM },
743 { MEM_SIZE, PHYS_OFFSET }, 743 { MEM_SIZE },
744 { 0, ATAG_NONE } 744 { 0, ATAG_NONE }
745}; 745};
746 746
@@ -839,6 +839,8 @@ void __init setup_arch(char **cmdline_p)
839 struct machine_desc *mdesc; 839 struct machine_desc *mdesc;
840 char *from = default_command_line; 840 char *from = default_command_line;
841 841
842 init_tags.mem.start = PHYS_OFFSET;
843
842 unwind_init(); 844 unwind_init();
843 845
844 setup_processor(); 846 setup_processor();
diff --git a/arch/arm/mach-msm/board-msm7x27.c b/arch/arm/mach-msm/board-msm7x27.c
index e7a76eff57d9..08fcd40a8cbd 100644
--- a/arch/arm/mach-msm/board-msm7x27.c
+++ b/arch/arm/mach-msm/board-msm7x27.c
@@ -132,7 +132,7 @@ static void __init msm7x2x_map_io(void)
132MACHINE_START(MSM7X27_SURF, "QCT MSM7x27 SURF") 132MACHINE_START(MSM7X27_SURF, "QCT MSM7x27 SURF")
133#ifdef CONFIG_MSM_DEBUG_UART 133#ifdef CONFIG_MSM_DEBUG_UART
134#endif 134#endif
135 .boot_params = PHYS_OFFSET + 0x100, 135 .boot_params = PLAT_PHYS_OFFSET + 0x100,
136 .map_io = msm7x2x_map_io, 136 .map_io = msm7x2x_map_io,
137 .init_irq = msm7x2x_init_irq, 137 .init_irq = msm7x2x_init_irq,
138 .init_machine = msm7x2x_init, 138 .init_machine = msm7x2x_init,
@@ -142,7 +142,7 @@ MACHINE_END
142MACHINE_START(MSM7X27_FFA, "QCT MSM7x27 FFA") 142MACHINE_START(MSM7X27_FFA, "QCT MSM7x27 FFA")
143#ifdef CONFIG_MSM_DEBUG_UART 143#ifdef CONFIG_MSM_DEBUG_UART
144#endif 144#endif
145 .boot_params = PHYS_OFFSET + 0x100, 145 .boot_params = PLAT_PHYS_OFFSET + 0x100,
146 .map_io = msm7x2x_map_io, 146 .map_io = msm7x2x_map_io,
147 .init_irq = msm7x2x_init_irq, 147 .init_irq = msm7x2x_init_irq,
148 .init_machine = msm7x2x_init, 148 .init_machine = msm7x2x_init,
@@ -152,7 +152,7 @@ MACHINE_END
152MACHINE_START(MSM7X25_SURF, "QCT MSM7x25 SURF") 152MACHINE_START(MSM7X25_SURF, "QCT MSM7x25 SURF")
153#ifdef CONFIG_MSM_DEBUG_UART 153#ifdef CONFIG_MSM_DEBUG_UART
154#endif 154#endif
155 .boot_params = PHYS_OFFSET + 0x100, 155 .boot_params = PLAT_PHYS_OFFSET + 0x100,
156 .map_io = msm7x2x_map_io, 156 .map_io = msm7x2x_map_io,
157 .init_irq = msm7x2x_init_irq, 157 .init_irq = msm7x2x_init_irq,
158 .init_machine = msm7x2x_init, 158 .init_machine = msm7x2x_init,
@@ -162,7 +162,7 @@ MACHINE_END
162MACHINE_START(MSM7X25_FFA, "QCT MSM7x25 FFA") 162MACHINE_START(MSM7X25_FFA, "QCT MSM7x25 FFA")
163#ifdef CONFIG_MSM_DEBUG_UART 163#ifdef CONFIG_MSM_DEBUG_UART
164#endif 164#endif
165 .boot_params = PHYS_OFFSET + 0x100, 165 .boot_params = PLAT_PHYS_OFFSET + 0x100,
166 .map_io = msm7x2x_map_io, 166 .map_io = msm7x2x_map_io,
167 .init_irq = msm7x2x_init_irq, 167 .init_irq = msm7x2x_init_irq,
168 .init_machine = msm7x2x_init, 168 .init_machine = msm7x2x_init,
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index decbf80b429e..25db8fd71a70 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -85,7 +85,7 @@ static void __init msm7x30_map_io(void)
85MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF") 85MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
86#ifdef CONFIG_MSM_DEBUG_UART 86#ifdef CONFIG_MSM_DEBUG_UART
87#endif 87#endif
88 .boot_params = PHYS_OFFSET + 0x100, 88 .boot_params = PLAT_PHYS_OFFSET + 0x100,
89 .map_io = msm7x30_map_io, 89 .map_io = msm7x30_map_io,
90 .init_irq = msm7x30_init_irq, 90 .init_irq = msm7x30_init_irq,
91 .init_machine = msm7x30_init, 91 .init_machine = msm7x30_init,
@@ -95,7 +95,7 @@ MACHINE_END
95MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") 95MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
96#ifdef CONFIG_MSM_DEBUG_UART 96#ifdef CONFIG_MSM_DEBUG_UART
97#endif 97#endif
98 .boot_params = PHYS_OFFSET + 0x100, 98 .boot_params = PLAT_PHYS_OFFSET + 0x100,
99 .map_io = msm7x30_map_io, 99 .map_io = msm7x30_map_io,
100 .init_irq = msm7x30_init_irq, 100 .init_irq = msm7x30_init_irq,
101 .init_machine = msm7x30_init, 101 .init_machine = msm7x30_init,
@@ -105,7 +105,7 @@ MACHINE_END
105MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") 105MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
106#ifdef CONFIG_MSM_DEBUG_UART 106#ifdef CONFIG_MSM_DEBUG_UART
107#endif 107#endif
108 .boot_params = PHYS_OFFSET + 0x100, 108 .boot_params = PLAT_PHYS_OFFSET + 0x100,
109 .map_io = msm7x30_map_io, 109 .map_io = msm7x30_map_io,
110 .init_irq = msm7x30_init_irq, 110 .init_irq = msm7x30_init_irq,
111 .init_machine = msm7x30_init, 111 .init_machine = msm7x30_init,
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
index 6dde8185205f..15c2bbd2ef81 100644
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ b/arch/arm/mach-msm/board-qsd8x50.c
@@ -118,7 +118,7 @@ static void __init qsd8x50_init(void)
118MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF") 118MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF")
119#ifdef CONFIG_MSM_DEBUG_UART 119#ifdef CONFIG_MSM_DEBUG_UART
120#endif 120#endif
121 .boot_params = PHYS_OFFSET + 0x100, 121 .boot_params = PLAT_PHYS_OFFSET + 0x100,
122 .map_io = qsd8x50_map_io, 122 .map_io = qsd8x50_map_io,
123 .init_irq = qsd8x50_init_irq, 123 .init_irq = qsd8x50_init_irq,
124 .init_machine = qsd8x50_init, 124 .init_machine = qsd8x50_init,
@@ -128,7 +128,7 @@ MACHINE_END
128MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5") 128MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5")
129#ifdef CONFIG_MSM_DEBUG_UART 129#ifdef CONFIG_MSM_DEBUG_UART
130#endif 130#endif
131 .boot_params = PHYS_OFFSET + 0x100, 131 .boot_params = PLAT_PHYS_OFFSET + 0x100,
132 .map_io = qsd8x50_map_io, 132 .map_io = qsd8x50_map_io,
133 .init_irq = qsd8x50_init_irq, 133 .init_irq = qsd8x50_init_irq,
134 .init_machine = qsd8x50_init, 134 .init_machine = qsd8x50_init,
diff --git a/arch/arm/mach-msm/board-sapphire.c b/arch/arm/mach-msm/board-sapphire.c
index 8919ffb17196..83604f526f0f 100644
--- a/arch/arm/mach-msm/board-sapphire.c
+++ b/arch/arm/mach-msm/board-sapphire.c
@@ -107,7 +107,7 @@ MACHINE_START(SAPPHIRE, "sapphire")
107/* Maintainer: Brian Swetland <swetland@google.com> */ 107/* Maintainer: Brian Swetland <swetland@google.com> */
108#ifdef CONFIG_MSM_DEBUG_UART 108#ifdef CONFIG_MSM_DEBUG_UART
109#endif 109#endif
110 .boot_params = PHYS_OFFSET + 0x100, 110 .boot_params = PLAT_PHYS_OFFSET + 0x100,
111 .fixup = sapphire_fixup, 111 .fixup = sapphire_fixup,
112 .map_io = sapphire_map_io, 112 .map_io = sapphire_map_io,
113 .init_irq = sapphire_init_irq, 113 .init_irq = sapphire_init_irq,
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index a134a1413e01..e194d928cdaa 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -829,5 +829,5 @@ MACHINE_START(BALLOON3, "Balloon3")
829 .init_irq = balloon3_init_irq, 829 .init_irq = balloon3_init_irq,
830 .timer = &pxa_timer, 830 .timer = &pxa_timer,
831 .init_machine = balloon3_init, 831 .init_machine = balloon3_init,
832 .boot_params = PHYS_OFFSET + 0x100, 832 .boot_params = PLAT_PHYS_OFFSET + 0x100,
833MACHINE_END 833MACHINE_END
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index 6ef5c5e528b2..8ede983b861c 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -484,7 +484,7 @@ static void __init realview_eb_init(void)
484 484
485MACHINE_START(REALVIEW_EB, "ARM-RealView EB") 485MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
486 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ 486 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
487 .boot_params = PHYS_OFFSET + 0x00000100, 487 .boot_params = PLAT_PHYS_OFFSET + 0x00000100,
488 .fixup = realview_fixup, 488 .fixup = realview_fixup,
489 .map_io = realview_eb_map_io, 489 .map_io = realview_eb_map_io,
490 .init_irq = gic_init_irq, 490 .init_irq = gic_init_irq,
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c
index cbdc97a5685f..9f26369555c7 100644
--- a/arch/arm/mach-realview/realview_pb1176.c
+++ b/arch/arm/mach-realview/realview_pb1176.c
@@ -379,7 +379,7 @@ static void __init realview_pb1176_init(void)
379 379
380MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176") 380MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
381 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ 381 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
382 .boot_params = PHYS_OFFSET + 0x00000100, 382 .boot_params = PLAT_PHYS_OFFSET + 0x00000100,
383 .fixup = realview_pb1176_fixup, 383 .fixup = realview_pb1176_fixup,
384 .map_io = realview_pb1176_map_io, 384 .map_io = realview_pb1176_map_io,
385 .init_irq = gic_init_irq, 385 .init_irq = gic_init_irq,
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c
index 8e8ab7d29a6a..dea06b2da3a2 100644
--- a/arch/arm/mach-realview/realview_pb11mp.c
+++ b/arch/arm/mach-realview/realview_pb11mp.c
@@ -381,7 +381,7 @@ static void __init realview_pb11mp_init(void)
381 381
382MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore") 382MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
383 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ 383 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
384 .boot_params = PHYS_OFFSET + 0x00000100, 384 .boot_params = PLAT_PHYS_OFFSET + 0x00000100,
385 .fixup = realview_fixup, 385 .fixup = realview_fixup,
386 .map_io = realview_pb11mp_map_io, 386 .map_io = realview_pb11mp_map_io,
387 .init_irq = gic_init_irq, 387 .init_irq = gic_init_irq,
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c
index 841118e3e118..7d0f1734a217 100644
--- a/arch/arm/mach-realview/realview_pba8.c
+++ b/arch/arm/mach-realview/realview_pba8.c
@@ -331,7 +331,7 @@ static void __init realview_pba8_init(void)
331 331
332MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") 332MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8")
333 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ 333 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
334 .boot_params = PHYS_OFFSET + 0x00000100, 334 .boot_params = PLAT_PHYS_OFFSET + 0x00000100,
335 .fixup = realview_fixup, 335 .fixup = realview_fixup,
336 .map_io = realview_pba8_map_io, 336 .map_io = realview_pba8_map_io,
337 .init_irq = gic_init_irq, 337 .init_irq = gic_init_irq,
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index 02b755b009db..b89e28f8853e 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -414,7 +414,7 @@ static void __init realview_pbx_init(void)
414 414
415MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") 415MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")
416 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ 416 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
417 .boot_params = PHYS_OFFSET + 0x00000100, 417 .boot_params = PLAT_PHYS_OFFSET + 0x00000100,
418 .fixup = realview_pbx_fixup, 418 .fixup = realview_pbx_fixup,
419 .map_io = realview_pbx_map_io, 419 .map_io = realview_pbx_map_io,
420 .init_irq = gic_init_irq, 420 .init_irq = gic_init_irq,
diff --git a/arch/arm/mach-s5pv210/sleep.S b/arch/arm/mach-s5pv210/sleep.S
index d4d222b716b4..27376223ea92 100644
--- a/arch/arm/mach-s5pv210/sleep.S
+++ b/arch/arm/mach-s5pv210/sleep.S
@@ -65,7 +65,7 @@ resume_with_mmu:
65 /* 65 /*
66 * After MMU is turned on, restore the previous MMU table. 66 * After MMU is turned on, restore the previous MMU table.
67 */ 67 */
68 ldr r9 , =(PAGE_OFFSET - PHYS_OFFSET) 68 ldr r9 , =(PAGE_OFFSET - PLAT_PHYS_OFFSET)
69 add r4, r4, r9 69 add r4, r4, r9
70 str r12, [r4] 70 str r12, [r4]
71 71
diff --git a/arch/arm/mach-tcc8k/board-tcc8000-sdk.c b/arch/arm/mach-tcc8k/board-tcc8000-sdk.c
index 7991415e666b..fb6426ddeb77 100644
--- a/arch/arm/mach-tcc8k/board-tcc8000-sdk.c
+++ b/arch/arm/mach-tcc8k/board-tcc8000-sdk.c
@@ -54,7 +54,7 @@ static void __init tcc8k_map_io(void)
54} 54}
55 55
56MACHINE_START(TCC8000_SDK, "Telechips TCC8000-SDK Demo Board") 56MACHINE_START(TCC8000_SDK, "Telechips TCC8000-SDK Demo Board")
57 .boot_params = PHYS_OFFSET + 0x00000100, 57 .boot_params = PLAT_PHYS_OFFSET + 0x00000100,
58 .map_io = tcc8k_map_io, 58 .map_io = tcc8k_map_io,
59 .init_irq = tcc8k_init_irq, 59 .init_irq = tcc8k_init_irq,
60 .init_machine = tcc8k_init, 60 .init_machine = tcc8k_init,
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c
index e628402b754c..e9bccc5230c9 100644
--- a/arch/arm/mach-vexpress/ct-ca9x4.c
+++ b/arch/arm/mach-vexpress/ct-ca9x4.c
@@ -243,7 +243,7 @@ static void __init ct_ca9x4_init(void)
243} 243}
244 244
245MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4") 245MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4")
246 .boot_params = PHYS_OFFSET + 0x00000100, 246 .boot_params = PLAT_PHYS_OFFSET + 0x00000100,
247 .map_io = ct_ca9x4_map_io, 247 .map_io = ct_ca9x4_map_io,
248 .init_irq = ct_ca9x4_init_irq, 248 .init_irq = ct_ca9x4_init_irq,
249#if 0 249#if 0
diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h
index cec5d56db2eb..8ff605c83aca 100644
--- a/arch/arm/plat-omap/include/plat/serial.h
+++ b/arch/arm/plat-omap/include/plat/serial.h
@@ -27,7 +27,7 @@
27 * 2. We assume printascii is called at least once before paging_init, 27 * 2. We assume printascii is called at least once before paging_init,
28 * and addruart has a chance to read OMAP_UART_INFO 28 * and addruart has a chance to read OMAP_UART_INFO
29 */ 29 */
30#define OMAP_UART_INFO (PHYS_OFFSET + 0x3ffc) 30#define OMAP_UART_INFO (PLAT_PHYS_OFFSET + 0x3ffc)
31 31
32/* OMAP1 serial ports */ 32/* OMAP1 serial ports */
33#define OMAP1_UART1_BASE 0xfffb0000 33#define OMAP1_UART1_BASE 0xfffb0000