]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
authorRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 4 Jan 2011 19:03:16 +0000 (19:03 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 17 Feb 2011 23:27:30 +0000 (23:27 +0000)
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>
15 files changed:
arch/arm/kernel/setup.c
arch/arm/mach-msm/board-msm7x27.c
arch/arm/mach-msm/board-msm7x30.c
arch/arm/mach-msm/board-qsd8x50.c
arch/arm/mach-msm/board-sapphire.c
arch/arm/mach-pxa/balloon3.c
arch/arm/mach-realview/realview_eb.c
arch/arm/mach-realview/realview_pb1176.c
arch/arm/mach-realview/realview_pb11mp.c
arch/arm/mach-realview/realview_pba8.c
arch/arm/mach-realview/realview_pbx.c
arch/arm/mach-s5pv210/sleep.S
arch/arm/mach-tcc8k/board-tcc8000-sdk.c
arch/arm/mach-vexpress/ct-ca9x4.c
arch/arm/plat-omap/include/plat/serial.h

index 78678b07901c5ff0c31d479fb854980afe699ef6..056bf1878f8af041625272215c88948f7eea6a5d 100644 (file)
@@ -740,7 +740,7 @@ static struct init_tags {
        { tag_size(tag_core), ATAG_CORE },
        { 1, PAGE_SIZE, 0xff },
        { tag_size(tag_mem32), ATAG_MEM },
-       { MEM_SIZE, PHYS_OFFSET },
+       { MEM_SIZE },
        { 0, ATAG_NONE }
 };
 
@@ -839,6 +839,8 @@ void __init setup_arch(char **cmdline_p)
        struct machine_desc *mdesc;
        char *from = default_command_line;
 
+       init_tags.mem.start = PHYS_OFFSET;
+
        unwind_init();
 
        setup_processor();
index e7a76eff57d93c878d45294f140038e076e64be3..08fcd40a8cbd2fedeffddfa1bbed9902d481b502 100644 (file)
@@ -132,7 +132,7 @@ static void __init msm7x2x_map_io(void)
 MACHINE_START(MSM7X27_SURF, "QCT MSM7x27 SURF")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-       .boot_params    = PHYS_OFFSET + 0x100,
+       .boot_params    = PLAT_PHYS_OFFSET + 0x100,
        .map_io         = msm7x2x_map_io,
        .init_irq       = msm7x2x_init_irq,
        .init_machine   = msm7x2x_init,
@@ -142,7 +142,7 @@ MACHINE_END
 MACHINE_START(MSM7X27_FFA, "QCT MSM7x27 FFA")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-       .boot_params    = PHYS_OFFSET + 0x100,
+       .boot_params    = PLAT_PHYS_OFFSET + 0x100,
        .map_io         = msm7x2x_map_io,
        .init_irq       = msm7x2x_init_irq,
        .init_machine   = msm7x2x_init,
@@ -152,7 +152,7 @@ MACHINE_END
 MACHINE_START(MSM7X25_SURF, "QCT MSM7x25 SURF")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-       .boot_params    = PHYS_OFFSET + 0x100,
+       .boot_params    = PLAT_PHYS_OFFSET + 0x100,
        .map_io         = msm7x2x_map_io,
        .init_irq       = msm7x2x_init_irq,
        .init_machine   = msm7x2x_init,
@@ -162,7 +162,7 @@ MACHINE_END
 MACHINE_START(MSM7X25_FFA, "QCT MSM7x25 FFA")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-       .boot_params    = PHYS_OFFSET + 0x100,
+       .boot_params    = PLAT_PHYS_OFFSET + 0x100,
        .map_io         = msm7x2x_map_io,
        .init_irq       = msm7x2x_init_irq,
        .init_machine   = msm7x2x_init,
index decbf80b429e0ca8b1551f20afa58d56c4366a8f..25db8fd71a70558f99e92c825cab9dfa5afb6f6b 100644 (file)
@@ -85,7 +85,7 @@ static void __init msm7x30_map_io(void)
 MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-       .boot_params = PHYS_OFFSET + 0x100,
+       .boot_params = PLAT_PHYS_OFFSET + 0x100,
        .map_io = msm7x30_map_io,
        .init_irq = msm7x30_init_irq,
        .init_machine = msm7x30_init,
@@ -95,7 +95,7 @@ MACHINE_END
 MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-       .boot_params = PHYS_OFFSET + 0x100,
+       .boot_params = PLAT_PHYS_OFFSET + 0x100,
        .map_io = msm7x30_map_io,
        .init_irq = msm7x30_init_irq,
        .init_machine = msm7x30_init,
@@ -105,7 +105,7 @@ MACHINE_END
 MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-       .boot_params = PHYS_OFFSET + 0x100,
+       .boot_params = PLAT_PHYS_OFFSET + 0x100,
        .map_io = msm7x30_map_io,
        .init_irq = msm7x30_init_irq,
        .init_machine = msm7x30_init,
index 6dde8185205f946b11a16cd4ee248e69c3256d69..15c2bbd2ef81840e5adc7ea789fd5d18ee0b3717 100644 (file)
@@ -118,7 +118,7 @@ static void __init qsd8x50_init(void)
 MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-       .boot_params = PHYS_OFFSET + 0x100,
+       .boot_params = PLAT_PHYS_OFFSET + 0x100,
        .map_io = qsd8x50_map_io,
        .init_irq = qsd8x50_init_irq,
        .init_machine = qsd8x50_init,
@@ -128,7 +128,7 @@ MACHINE_END
 MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-       .boot_params = PHYS_OFFSET + 0x100,
+       .boot_params = PLAT_PHYS_OFFSET + 0x100,
        .map_io = qsd8x50_map_io,
        .init_irq = qsd8x50_init_irq,
        .init_machine = qsd8x50_init,
index 8919ffb1719600bfbd954d93d8c1eb2d7369261b..83604f526f0f350720acaf9f43de47cd8d070018 100644 (file)
@@ -107,7 +107,7 @@ MACHINE_START(SAPPHIRE, "sapphire")
 /* Maintainer: Brian Swetland <swetland@google.com> */
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-       .boot_params    = PHYS_OFFSET + 0x100,
+       .boot_params    = PLAT_PHYS_OFFSET + 0x100,
        .fixup          = sapphire_fixup,
        .map_io         = sapphire_map_io,
        .init_irq       = sapphire_init_irq,
index a134a1413e014ddc68614e752c6971aff2492a56..e194d928cdaa89161d4ca9e4efbce6f64e6294f6 100644 (file)
@@ -829,5 +829,5 @@ MACHINE_START(BALLOON3, "Balloon3")
        .init_irq       = balloon3_init_irq,
        .timer          = &pxa_timer,
        .init_machine   = balloon3_init,
-       .boot_params    = PHYS_OFFSET + 0x100,
+       .boot_params    = PLAT_PHYS_OFFSET + 0x100,
 MACHINE_END
index 6ef5c5e528b251b86ec91f6f7102788265a62ec3..8ede983b861c1af616c7133420b29f052ec86682 100644 (file)
@@ -484,7 +484,7 @@ static void __init realview_eb_init(void)
 
 MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
        /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
-       .boot_params    = PHYS_OFFSET + 0x00000100,
+       .boot_params    = PLAT_PHYS_OFFSET + 0x00000100,
        .fixup          = realview_fixup,
        .map_io         = realview_eb_map_io,
        .init_irq       = gic_init_irq,
index cbdc97a5685fc11ad764587414f56a8420cb02ab..9f26369555c75a0f13ad9ad0ca8231745909f4f9 100644 (file)
@@ -379,7 +379,7 @@ static void __init realview_pb1176_init(void)
 
 MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
        /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
-       .boot_params    = PHYS_OFFSET + 0x00000100,
+       .boot_params    = PLAT_PHYS_OFFSET + 0x00000100,
        .fixup          = realview_pb1176_fixup,
        .map_io         = realview_pb1176_map_io,
        .init_irq       = gic_init_irq,
index 8e8ab7d29a6a0d8b6b020b7ea513e6ec8c96c021..dea06b2da3a287e9e6ed254880caef0ee47e3d96 100644 (file)
@@ -381,7 +381,7 @@ static void __init realview_pb11mp_init(void)
 
 MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
        /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
-       .boot_params    = PHYS_OFFSET + 0x00000100,
+       .boot_params    = PLAT_PHYS_OFFSET + 0x00000100,
        .fixup          = realview_fixup,
        .map_io         = realview_pb11mp_map_io,
        .init_irq       = gic_init_irq,
index 841118e3e118c7383be126131f8dc5ef125b6461..7d0f1734a2178a1681c7d41b61ead5e367d8e19b 100644 (file)
@@ -331,7 +331,7 @@ static void __init realview_pba8_init(void)
 
 MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8")
        /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
-       .boot_params    = PHYS_OFFSET + 0x00000100,
+       .boot_params    = PLAT_PHYS_OFFSET + 0x00000100,
        .fixup          = realview_fixup,
        .map_io         = realview_pba8_map_io,
        .init_irq       = gic_init_irq,
index 02b755b009dbc0c859f0ebf9d98bbf7f6ea96ad9..b89e28f8853eb27ec5943cc51e7c853f504de2b9 100644 (file)
@@ -414,7 +414,7 @@ static void __init realview_pbx_init(void)
 
 MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")
        /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
-       .boot_params    = PHYS_OFFSET + 0x00000100,
+       .boot_params    = PLAT_PHYS_OFFSET + 0x00000100,
        .fixup          = realview_pbx_fixup,
        .map_io         = realview_pbx_map_io,
        .init_irq       = gic_init_irq,
index d4d222b716b434e046ccd274e7b9a8dd01f4484d..27376223ea9225c7725a273cab71c630aae402af 100644 (file)
@@ -65,7 +65,7 @@ resume_with_mmu:
        /*
         * 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
        str     r12, [r4]
 
index 7991415e666bc7646007fd6ada2fcbf83ca84d8a..fb6426ddeb77042633602ad73f68aa10cdf9bd3a 100644 (file)
@@ -54,7 +54,7 @@ static void __init tcc8k_map_io(void)
 }
 
 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,
        .init_irq       = tcc8k_init_irq,
        .init_machine   = tcc8k_init,
index e628402b754cd4c41527d67c87504ad4fea43e8e..e9bccc5230c972bf5fdeeabdfccf09ab6a4e6257 100644 (file)
@@ -243,7 +243,7 @@ static void __init ct_ca9x4_init(void)
 }
 
 MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4")
-       .boot_params    = PHYS_OFFSET + 0x00000100,
+       .boot_params    = PLAT_PHYS_OFFSET + 0x00000100,
        .map_io         = ct_ca9x4_map_io,
        .init_irq       = ct_ca9x4_init_irq,
 #if 0
index cec5d56db2eb842725277064f4e155599fe30cbc..8ff605c83aca89dfa780b2f1efb7cd682f57b6df 100644 (file)
@@ -27,7 +27,7 @@
  * 2. We assume printascii is called at least once before paging_init,
  *    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 */
 #define OMAP1_UART1_BASE       0xfffb0000