提交 b75c178a 编写于 作者: R Russell King

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: NNicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: NTony Lindgren <tony@atomide.com>
Acked-by: NKukjin Kim <kgene.kim@samsung.com>
Acked-by: NDavid Brown <davidb@codeaurora.org>
Acked-by: NEric Miao <eric.y.miao@gmail.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 f4117ac9
...@@ -740,7 +740,7 @@ static struct init_tags { ...@@ -740,7 +740,7 @@ static struct init_tags {
{ tag_size(tag_core), ATAG_CORE }, { tag_size(tag_core), ATAG_CORE },
{ 1, PAGE_SIZE, 0xff }, { 1, PAGE_SIZE, 0xff },
{ tag_size(tag_mem32), ATAG_MEM }, { tag_size(tag_mem32), ATAG_MEM },
{ MEM_SIZE, PHYS_OFFSET }, { MEM_SIZE },
{ 0, ATAG_NONE } { 0, ATAG_NONE }
}; };
...@@ -839,6 +839,8 @@ void __init setup_arch(char **cmdline_p) ...@@ -839,6 +839,8 @@ void __init setup_arch(char **cmdline_p)
struct machine_desc *mdesc; struct machine_desc *mdesc;
char *from = default_command_line; char *from = default_command_line;
init_tags.mem.start = PHYS_OFFSET;
unwind_init(); unwind_init();
setup_processor(); setup_processor();
......
...@@ -132,7 +132,7 @@ static void __init msm7x2x_map_io(void) ...@@ -132,7 +132,7 @@ static void __init msm7x2x_map_io(void)
MACHINE_START(MSM7X27_SURF, "QCT MSM7x27 SURF") MACHINE_START(MSM7X27_SURF, "QCT MSM7x27 SURF")
#ifdef CONFIG_MSM_DEBUG_UART #ifdef CONFIG_MSM_DEBUG_UART
#endif #endif
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PLAT_PHYS_OFFSET + 0x100,
.map_io = msm7x2x_map_io, .map_io = msm7x2x_map_io,
.init_irq = msm7x2x_init_irq, .init_irq = msm7x2x_init_irq,
.init_machine = msm7x2x_init, .init_machine = msm7x2x_init,
...@@ -142,7 +142,7 @@ MACHINE_END ...@@ -142,7 +142,7 @@ MACHINE_END
MACHINE_START(MSM7X27_FFA, "QCT MSM7x27 FFA") MACHINE_START(MSM7X27_FFA, "QCT MSM7x27 FFA")
#ifdef CONFIG_MSM_DEBUG_UART #ifdef CONFIG_MSM_DEBUG_UART
#endif #endif
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PLAT_PHYS_OFFSET + 0x100,
.map_io = msm7x2x_map_io, .map_io = msm7x2x_map_io,
.init_irq = msm7x2x_init_irq, .init_irq = msm7x2x_init_irq,
.init_machine = msm7x2x_init, .init_machine = msm7x2x_init,
...@@ -152,7 +152,7 @@ MACHINE_END ...@@ -152,7 +152,7 @@ MACHINE_END
MACHINE_START(MSM7X25_SURF, "QCT MSM7x25 SURF") MACHINE_START(MSM7X25_SURF, "QCT MSM7x25 SURF")
#ifdef CONFIG_MSM_DEBUG_UART #ifdef CONFIG_MSM_DEBUG_UART
#endif #endif
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PLAT_PHYS_OFFSET + 0x100,
.map_io = msm7x2x_map_io, .map_io = msm7x2x_map_io,
.init_irq = msm7x2x_init_irq, .init_irq = msm7x2x_init_irq,
.init_machine = msm7x2x_init, .init_machine = msm7x2x_init,
...@@ -162,7 +162,7 @@ MACHINE_END ...@@ -162,7 +162,7 @@ MACHINE_END
MACHINE_START(MSM7X25_FFA, "QCT MSM7x25 FFA") MACHINE_START(MSM7X25_FFA, "QCT MSM7x25 FFA")
#ifdef CONFIG_MSM_DEBUG_UART #ifdef CONFIG_MSM_DEBUG_UART
#endif #endif
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PLAT_PHYS_OFFSET + 0x100,
.map_io = msm7x2x_map_io, .map_io = msm7x2x_map_io,
.init_irq = msm7x2x_init_irq, .init_irq = msm7x2x_init_irq,
.init_machine = msm7x2x_init, .init_machine = msm7x2x_init,
......
...@@ -85,7 +85,7 @@ static void __init msm7x30_map_io(void) ...@@ -85,7 +85,7 @@ static void __init msm7x30_map_io(void)
MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF") MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
#ifdef CONFIG_MSM_DEBUG_UART #ifdef CONFIG_MSM_DEBUG_UART
#endif #endif
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PLAT_PHYS_OFFSET + 0x100,
.map_io = msm7x30_map_io, .map_io = msm7x30_map_io,
.init_irq = msm7x30_init_irq, .init_irq = msm7x30_init_irq,
.init_machine = msm7x30_init, .init_machine = msm7x30_init,
...@@ -95,7 +95,7 @@ MACHINE_END ...@@ -95,7 +95,7 @@ MACHINE_END
MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
#ifdef CONFIG_MSM_DEBUG_UART #ifdef CONFIG_MSM_DEBUG_UART
#endif #endif
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PLAT_PHYS_OFFSET + 0x100,
.map_io = msm7x30_map_io, .map_io = msm7x30_map_io,
.init_irq = msm7x30_init_irq, .init_irq = msm7x30_init_irq,
.init_machine = msm7x30_init, .init_machine = msm7x30_init,
...@@ -105,7 +105,7 @@ MACHINE_END ...@@ -105,7 +105,7 @@ MACHINE_END
MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
#ifdef CONFIG_MSM_DEBUG_UART #ifdef CONFIG_MSM_DEBUG_UART
#endif #endif
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PLAT_PHYS_OFFSET + 0x100,
.map_io = msm7x30_map_io, .map_io = msm7x30_map_io,
.init_irq = msm7x30_init_irq, .init_irq = msm7x30_init_irq,
.init_machine = msm7x30_init, .init_machine = msm7x30_init,
......
...@@ -118,7 +118,7 @@ static void __init qsd8x50_init(void) ...@@ -118,7 +118,7 @@ static void __init qsd8x50_init(void)
MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF") MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF")
#ifdef CONFIG_MSM_DEBUG_UART #ifdef CONFIG_MSM_DEBUG_UART
#endif #endif
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PLAT_PHYS_OFFSET + 0x100,
.map_io = qsd8x50_map_io, .map_io = qsd8x50_map_io,
.init_irq = qsd8x50_init_irq, .init_irq = qsd8x50_init_irq,
.init_machine = qsd8x50_init, .init_machine = qsd8x50_init,
...@@ -128,7 +128,7 @@ MACHINE_END ...@@ -128,7 +128,7 @@ MACHINE_END
MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5") MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5")
#ifdef CONFIG_MSM_DEBUG_UART #ifdef CONFIG_MSM_DEBUG_UART
#endif #endif
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PLAT_PHYS_OFFSET + 0x100,
.map_io = qsd8x50_map_io, .map_io = qsd8x50_map_io,
.init_irq = qsd8x50_init_irq, .init_irq = qsd8x50_init_irq,
.init_machine = qsd8x50_init, .init_machine = qsd8x50_init,
......
...@@ -107,7 +107,7 @@ MACHINE_START(SAPPHIRE, "sapphire") ...@@ -107,7 +107,7 @@ MACHINE_START(SAPPHIRE, "sapphire")
/* Maintainer: Brian Swetland <swetland@google.com> */ /* Maintainer: Brian Swetland <swetland@google.com> */
#ifdef CONFIG_MSM_DEBUG_UART #ifdef CONFIG_MSM_DEBUG_UART
#endif #endif
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PLAT_PHYS_OFFSET + 0x100,
.fixup = sapphire_fixup, .fixup = sapphire_fixup,
.map_io = sapphire_map_io, .map_io = sapphire_map_io,
.init_irq = sapphire_init_irq, .init_irq = sapphire_init_irq,
......
...@@ -829,5 +829,5 @@ MACHINE_START(BALLOON3, "Balloon3") ...@@ -829,5 +829,5 @@ MACHINE_START(BALLOON3, "Balloon3")
.init_irq = balloon3_init_irq, .init_irq = balloon3_init_irq,
.timer = &pxa_timer, .timer = &pxa_timer,
.init_machine = balloon3_init, .init_machine = balloon3_init,
.boot_params = PHYS_OFFSET + 0x100, .boot_params = PLAT_PHYS_OFFSET + 0x100,
MACHINE_END MACHINE_END
...@@ -484,7 +484,7 @@ static void __init realview_eb_init(void) ...@@ -484,7 +484,7 @@ static void __init realview_eb_init(void)
MACHINE_START(REALVIEW_EB, "ARM-RealView EB") MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
.boot_params = PHYS_OFFSET + 0x00000100, .boot_params = PLAT_PHYS_OFFSET + 0x00000100,
.fixup = realview_fixup, .fixup = realview_fixup,
.map_io = realview_eb_map_io, .map_io = realview_eb_map_io,
.init_irq = gic_init_irq, .init_irq = gic_init_irq,
......
...@@ -379,7 +379,7 @@ static void __init realview_pb1176_init(void) ...@@ -379,7 +379,7 @@ static void __init realview_pb1176_init(void)
MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176") MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
.boot_params = PHYS_OFFSET + 0x00000100, .boot_params = PLAT_PHYS_OFFSET + 0x00000100,
.fixup = realview_pb1176_fixup, .fixup = realview_pb1176_fixup,
.map_io = realview_pb1176_map_io, .map_io = realview_pb1176_map_io,
.init_irq = gic_init_irq, .init_irq = gic_init_irq,
......
...@@ -381,7 +381,7 @@ static void __init realview_pb11mp_init(void) ...@@ -381,7 +381,7 @@ static void __init realview_pb11mp_init(void)
MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore") MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
.boot_params = PHYS_OFFSET + 0x00000100, .boot_params = PLAT_PHYS_OFFSET + 0x00000100,
.fixup = realview_fixup, .fixup = realview_fixup,
.map_io = realview_pb11mp_map_io, .map_io = realview_pb11mp_map_io,
.init_irq = gic_init_irq, .init_irq = gic_init_irq,
......
...@@ -331,7 +331,7 @@ static void __init realview_pba8_init(void) ...@@ -331,7 +331,7 @@ static void __init realview_pba8_init(void)
MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8")
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
.boot_params = PHYS_OFFSET + 0x00000100, .boot_params = PLAT_PHYS_OFFSET + 0x00000100,
.fixup = realview_fixup, .fixup = realview_fixup,
.map_io = realview_pba8_map_io, .map_io = realview_pba8_map_io,
.init_irq = gic_init_irq, .init_irq = gic_init_irq,
......
...@@ -414,7 +414,7 @@ static void __init realview_pbx_init(void) ...@@ -414,7 +414,7 @@ static void __init realview_pbx_init(void)
MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
.boot_params = PHYS_OFFSET + 0x00000100, .boot_params = PLAT_PHYS_OFFSET + 0x00000100,
.fixup = realview_pbx_fixup, .fixup = realview_pbx_fixup,
.map_io = realview_pbx_map_io, .map_io = realview_pbx_map_io,
.init_irq = gic_init_irq, .init_irq = gic_init_irq,
......
...@@ -65,7 +65,7 @@ resume_with_mmu: ...@@ -65,7 +65,7 @@ resume_with_mmu:
/* /*
* After MMU is turned on, restore the previous MMU table. * After MMU is turned on, restore the previous MMU table.
*/ */
ldr r9 , =(PAGE_OFFSET - PHYS_OFFSET) ldr r9 , =(PAGE_OFFSET - PLAT_PHYS_OFFSET)
add r4, r4, r9 add r4, r4, r9
str r12, [r4] str r12, [r4]
......
...@@ -54,7 +54,7 @@ static void __init tcc8k_map_io(void) ...@@ -54,7 +54,7 @@ static void __init tcc8k_map_io(void)
} }
MACHINE_START(TCC8000_SDK, "Telechips TCC8000-SDK Demo Board") MACHINE_START(TCC8000_SDK, "Telechips TCC8000-SDK Demo Board")
.boot_params = PHYS_OFFSET + 0x00000100, .boot_params = PLAT_PHYS_OFFSET + 0x00000100,
.map_io = tcc8k_map_io, .map_io = tcc8k_map_io,
.init_irq = tcc8k_init_irq, .init_irq = tcc8k_init_irq,
.init_machine = tcc8k_init, .init_machine = tcc8k_init,
......
...@@ -243,7 +243,7 @@ static void __init ct_ca9x4_init(void) ...@@ -243,7 +243,7 @@ static void __init ct_ca9x4_init(void)
} }
MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4") MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4")
.boot_params = PHYS_OFFSET + 0x00000100, .boot_params = PLAT_PHYS_OFFSET + 0x00000100,
.map_io = ct_ca9x4_map_io, .map_io = ct_ca9x4_map_io,
.init_irq = ct_ca9x4_init_irq, .init_irq = ct_ca9x4_init_irq,
#if 0 #if 0
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
* 2. We assume printascii is called at least once before paging_init, * 2. We assume printascii is called at least once before paging_init,
* and addruart has a chance to read OMAP_UART_INFO * and addruart has a chance to read OMAP_UART_INFO
*/ */
#define OMAP_UART_INFO (PHYS_OFFSET + 0x3ffc) #define OMAP_UART_INFO (PLAT_PHYS_OFFSET + 0x3ffc)
/* OMAP1 serial ports */ /* OMAP1 serial ports */
#define OMAP1_UART1_BASE 0xfffb0000 #define OMAP1_UART1_BASE 0xfffb0000
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册