summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2017-01-14 21:59:29 -0500
committerRussell King <rmk+kernel@armlinux.org.uk>2017-02-28 06:06:10 -0500
commit64fc2a947a9873700929ec0ef02b4654a04e0476 (patch)
treee6544adf3c58dd749e5dfc08c94a80fbdd1b59d3
parente377cd8221ebbe0b517861aa3d823bb42f9abbd4 (diff)
ARM: 8641/1: treewide: Replace uses of virt_to_phys with __pa_symbol
All low-level PM/SMP code using virt_to_phys() should actually use __pa_symbol() against kernel symbols. Update code where relevant to move away from virt_to_phys(). Acked-by: Russell King <rmk+kernel@armlinux.org.uk> Reviewed-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/common/mcpm_entry.c12
-rw-r--r--arch/arm/mach-alpine/platsmp.c2
-rw-r--r--arch/arm/mach-axxia/platsmp.c2
-rw-r--r--arch/arm/mach-bcm/bcm63xx_smp.c2
-rw-r--r--arch/arm/mach-bcm/platsmp-brcmstb.c2
-rw-r--r--arch/arm/mach-bcm/platsmp.c4
-rw-r--r--arch/arm/mach-berlin/platsmp.c2
-rw-r--r--arch/arm/mach-exynos/firmware.c4
-rw-r--r--arch/arm/mach-exynos/mcpm-exynos.c2
-rw-r--r--arch/arm/mach-exynos/platsmp.c4
-rw-r--r--arch/arm/mach-exynos/pm.c6
-rw-r--r--arch/arm/mach-exynos/suspend.c6
-rw-r--r--arch/arm/mach-hisi/platmcpm.c2
-rw-r--r--arch/arm/mach-hisi/platsmp.c6
-rw-r--r--arch/arm/mach-imx/platsmp.c2
-rw-r--r--arch/arm/mach-imx/pm-imx6.c2
-rw-r--r--arch/arm/mach-imx/src.c2
-rw-r--r--arch/arm/mach-mediatek/platsmp.c2
-rw-r--r--arch/arm/mach-mvebu/pm.c2
-rw-r--r--arch/arm/mach-mvebu/pmsu.c2
-rw-r--r--arch/arm/mach-mvebu/system-controller.c2
-rw-r--r--arch/arm/mach-omap2/control.c8
-rw-r--r--arch/arm/mach-omap2/omap-mpuss-lowpower.c12
-rw-r--r--arch/arm/mach-omap2/omap-smp.c4
-rw-r--r--arch/arm/mach-prima2/platsmp.c2
-rw-r--r--arch/arm/mach-prima2/pm.c2
-rw-r--r--arch/arm/mach-pxa/palmz72.c2
-rw-r--r--arch/arm/mach-pxa/pxa25x.c2
-rw-r--r--arch/arm/mach-pxa/pxa27x.c2
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c2
-rw-r--r--arch/arm/mach-realview/platsmp-dt.c2
-rw-r--r--arch/arm/mach-rockchip/platsmp.c4
-rw-r--r--arch/arm/mach-rockchip/pm.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-jive.c2
-rw-r--r--arch/arm/mach-s3c24xx/pm-s3c2410.c2
-rw-r--r--arch/arm/mach-s3c24xx/pm-s3c2416.c2
-rw-r--r--arch/arm/mach-s3c64xx/pm.c2
-rw-r--r--arch/arm/mach-s5pv210/pm.c2
-rw-r--r--arch/arm/mach-sa1100/pm.c2
-rw-r--r--arch/arm/mach-shmobile/platsmp-apmu.c6
-rw-r--r--arch/arm/mach-shmobile/platsmp-scu.c4
-rw-r--r--arch/arm/mach-socfpga/platsmp.c4
-rw-r--r--arch/arm/mach-spear/platsmp.c2
-rw-r--r--arch/arm/mach-sti/platsmp.c2
-rw-r--r--arch/arm/mach-sunxi/platsmp.c4
-rw-r--r--arch/arm/mach-tango/platsmp.c2
-rw-r--r--arch/arm/mach-tango/pm.c2
-rw-r--r--arch/arm/mach-tegra/reset.c4
-rw-r--r--arch/arm/mach-ux500/platsmp.c2
-rw-r--r--arch/arm/mach-vexpress/dcscb.c2
-rw-r--r--arch/arm/mach-vexpress/platsmp.c2
-rw-r--r--arch/arm/mach-vexpress/tc2_pm.c4
-rw-r--r--arch/arm/mach-zx/platsmp.c4
-rw-r--r--arch/arm/mach-zynq/platsmp.c2
54 files changed, 86 insertions, 86 deletions
diff --git a/arch/arm/common/mcpm_entry.c b/arch/arm/common/mcpm_entry.c
index a923524d1040..cf062472e07b 100644
--- a/arch/arm/common/mcpm_entry.c
+++ b/arch/arm/common/mcpm_entry.c
@@ -144,7 +144,7 @@ extern unsigned long mcpm_entry_vectors[MAX_NR_CLUSTERS][MAX_CPUS_PER_CLUSTER];
144 144
145void mcpm_set_entry_vector(unsigned cpu, unsigned cluster, void *ptr) 145void mcpm_set_entry_vector(unsigned cpu, unsigned cluster, void *ptr)
146{ 146{
147 unsigned long val = ptr ? virt_to_phys(ptr) : 0; 147 unsigned long val = ptr ? __pa_symbol(ptr) : 0;
148 mcpm_entry_vectors[cluster][cpu] = val; 148 mcpm_entry_vectors[cluster][cpu] = val;
149 sync_cache_w(&mcpm_entry_vectors[cluster][cpu]); 149 sync_cache_w(&mcpm_entry_vectors[cluster][cpu]);
150} 150}
@@ -299,8 +299,8 @@ void mcpm_cpu_power_down(void)
299 * the kernel as if the power_up method just had deasserted reset 299 * the kernel as if the power_up method just had deasserted reset
300 * on the CPU. 300 * on the CPU.
301 */ 301 */
302 phys_reset = (phys_reset_t)(unsigned long)virt_to_phys(cpu_reset); 302 phys_reset = (phys_reset_t)(unsigned long)__pa_symbol(cpu_reset);
303 phys_reset(virt_to_phys(mcpm_entry_point)); 303 phys_reset(__pa_symbol(mcpm_entry_point));
304 304
305 /* should never get here */ 305 /* should never get here */
306 BUG(); 306 BUG();
@@ -388,8 +388,8 @@ static int __init nocache_trampoline(unsigned long _arg)
388 __mcpm_outbound_leave_critical(cluster, CLUSTER_DOWN); 388 __mcpm_outbound_leave_critical(cluster, CLUSTER_DOWN);
389 __mcpm_cpu_down(cpu, cluster); 389 __mcpm_cpu_down(cpu, cluster);
390 390
391 phys_reset = (phys_reset_t)(unsigned long)virt_to_phys(cpu_reset); 391 phys_reset = (phys_reset_t)(unsigned long)__pa_symbol(cpu_reset);
392 phys_reset(virt_to_phys(mcpm_entry_point)); 392 phys_reset(__pa_symbol(mcpm_entry_point));
393 BUG(); 393 BUG();
394} 394}
395 395
@@ -449,7 +449,7 @@ int __init mcpm_sync_init(
449 sync_cache_w(&mcpm_sync); 449 sync_cache_w(&mcpm_sync);
450 450
451 if (power_up_setup) { 451 if (power_up_setup) {
452 mcpm_power_up_setup_phys = virt_to_phys(power_up_setup); 452 mcpm_power_up_setup_phys = __pa_symbol(power_up_setup);
453 sync_cache_w(&mcpm_power_up_setup_phys); 453 sync_cache_w(&mcpm_power_up_setup_phys);
454 } 454 }
455 455
diff --git a/arch/arm/mach-alpine/platsmp.c b/arch/arm/mach-alpine/platsmp.c
index dd77ea25e7ca..6dc6d491f88a 100644
--- a/arch/arm/mach-alpine/platsmp.c
+++ b/arch/arm/mach-alpine/platsmp.c
@@ -27,7 +27,7 @@ static int alpine_boot_secondary(unsigned int cpu, struct task_struct *idle)
27{ 27{
28 phys_addr_t addr; 28 phys_addr_t addr;
29 29
30 addr = virt_to_phys(secondary_startup); 30 addr = __pa_symbol(secondary_startup);
31 31
32 if (addr > (phys_addr_t)(uint32_t)(-1)) { 32 if (addr > (phys_addr_t)(uint32_t)(-1)) {
33 pr_err("FAIL: resume address over 32bit (%pa)", &addr); 33 pr_err("FAIL: resume address over 32bit (%pa)", &addr);
diff --git a/arch/arm/mach-axxia/platsmp.c b/arch/arm/mach-axxia/platsmp.c
index ffbd71d45008..502e3df69f69 100644
--- a/arch/arm/mach-axxia/platsmp.c
+++ b/arch/arm/mach-axxia/platsmp.c
@@ -25,7 +25,7 @@
25static void write_release_addr(u32 release_phys) 25static void write_release_addr(u32 release_phys)
26{ 26{
27 u32 *virt = (u32 *) phys_to_virt(release_phys); 27 u32 *virt = (u32 *) phys_to_virt(release_phys);
28 writel_relaxed(virt_to_phys(secondary_startup), virt); 28 writel_relaxed(__pa_symbol(secondary_startup), virt);
29 /* Make sure this store is visible to other CPUs */ 29 /* Make sure this store is visible to other CPUs */
30 smp_wmb(); 30 smp_wmb();
31 __cpuc_flush_dcache_area(virt, sizeof(u32)); 31 __cpuc_flush_dcache_area(virt, sizeof(u32));
diff --git a/arch/arm/mach-bcm/bcm63xx_smp.c b/arch/arm/mach-bcm/bcm63xx_smp.c
index 9b6727ed68cd..f5fb10b4376f 100644
--- a/arch/arm/mach-bcm/bcm63xx_smp.c
+++ b/arch/arm/mach-bcm/bcm63xx_smp.c
@@ -135,7 +135,7 @@ static int bcm63138_smp_boot_secondary(unsigned int cpu,
135 } 135 }
136 136
137 /* Write the secondary init routine to the BootLUT reset vector */ 137 /* Write the secondary init routine to the BootLUT reset vector */
138 val = virt_to_phys(secondary_startup); 138 val = __pa_symbol(secondary_startup);
139 writel_relaxed(val, bootlut_base + BOOTLUT_RESET_VECT); 139 writel_relaxed(val, bootlut_base + BOOTLUT_RESET_VECT);
140 140
141 /* Power up the core, will jump straight to its reset vector when we 141 /* Power up the core, will jump straight to its reset vector when we
diff --git a/arch/arm/mach-bcm/platsmp-brcmstb.c b/arch/arm/mach-bcm/platsmp-brcmstb.c
index 40dc8448445e..12379960e982 100644
--- a/arch/arm/mach-bcm/platsmp-brcmstb.c
+++ b/arch/arm/mach-bcm/platsmp-brcmstb.c
@@ -151,7 +151,7 @@ static void brcmstb_cpu_boot(u32 cpu)
151 * Set the reset vector to point to the secondary_startup 151 * Set the reset vector to point to the secondary_startup
152 * routine 152 * routine
153 */ 153 */
154 cpu_set_boot_addr(cpu, virt_to_phys(secondary_startup)); 154 cpu_set_boot_addr(cpu, __pa_symbol(secondary_startup));
155 155
156 /* Unhalt the cpu */ 156 /* Unhalt the cpu */
157 cpu_rst_cfg_set(cpu, 0); 157 cpu_rst_cfg_set(cpu, 0);
diff --git a/arch/arm/mach-bcm/platsmp.c b/arch/arm/mach-bcm/platsmp.c
index 3ac3a9bc663c..582886d0d02f 100644
--- a/arch/arm/mach-bcm/platsmp.c
+++ b/arch/arm/mach-bcm/platsmp.c
@@ -116,7 +116,7 @@ static int nsp_write_lut(unsigned int cpu)
116 return -ENOMEM; 116 return -ENOMEM;
117 } 117 }
118 118
119 secondary_startup_phy = virt_to_phys(secondary_startup); 119 secondary_startup_phy = __pa_symbol(secondary_startup);
120 BUG_ON(secondary_startup_phy > (phys_addr_t)U32_MAX); 120 BUG_ON(secondary_startup_phy > (phys_addr_t)U32_MAX);
121 121
122 writel_relaxed(secondary_startup_phy, sku_rom_lut); 122 writel_relaxed(secondary_startup_phy, sku_rom_lut);
@@ -189,7 +189,7 @@ static int kona_boot_secondary(unsigned int cpu, struct task_struct *idle)
189 * Secondary cores will start in secondary_startup(), 189 * Secondary cores will start in secondary_startup(),
190 * defined in "arch/arm/kernel/head.S" 190 * defined in "arch/arm/kernel/head.S"
191 */ 191 */
192 boot_func = virt_to_phys(secondary_startup); 192 boot_func = __pa_symbol(secondary_startup);
193 BUG_ON(boot_func & BOOT_ADDR_CPUID_MASK); 193 BUG_ON(boot_func & BOOT_ADDR_CPUID_MASK);
194 BUG_ON(boot_func > (phys_addr_t)U32_MAX); 194 BUG_ON(boot_func > (phys_addr_t)U32_MAX);
195 195
diff --git a/arch/arm/mach-berlin/platsmp.c b/arch/arm/mach-berlin/platsmp.c
index 93f90688db18..1167b0ed92c8 100644
--- a/arch/arm/mach-berlin/platsmp.c
+++ b/arch/arm/mach-berlin/platsmp.c
@@ -92,7 +92,7 @@ static void __init berlin_smp_prepare_cpus(unsigned int max_cpus)
92 * Write the secondary startup address into the SW reset address 92 * Write the secondary startup address into the SW reset address
93 * vector. This is used by boot_inst. 93 * vector. This is used by boot_inst.
94 */ 94 */
95 writel(virt_to_phys(secondary_startup), vectors_base + SW_RESET_ADDR); 95 writel(__pa_symbol(secondary_startup), vectors_base + SW_RESET_ADDR);
96 96
97 iounmap(vectors_base); 97 iounmap(vectors_base);
98unmap_scu: 98unmap_scu:
diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c
index fd6da5419b51..e81a78b125d9 100644
--- a/arch/arm/mach-exynos/firmware.c
+++ b/arch/arm/mach-exynos/firmware.c
@@ -41,7 +41,7 @@ static int exynos_do_idle(unsigned long mode)
41 case FW_DO_IDLE_AFTR: 41 case FW_DO_IDLE_AFTR:
42 if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9) 42 if (read_cpuid_part() == ARM_CPU_PART_CORTEX_A9)
43 exynos_save_cp15(); 43 exynos_save_cp15();
44 writel_relaxed(virt_to_phys(exynos_cpu_resume_ns), 44 writel_relaxed(__pa_symbol(exynos_cpu_resume_ns),
45 sysram_ns_base_addr + 0x24); 45 sysram_ns_base_addr + 0x24);
46 writel_relaxed(EXYNOS_AFTR_MAGIC, sysram_ns_base_addr + 0x20); 46 writel_relaxed(EXYNOS_AFTR_MAGIC, sysram_ns_base_addr + 0x20);
47 if (soc_is_exynos3250()) { 47 if (soc_is_exynos3250()) {
@@ -135,7 +135,7 @@ static int exynos_suspend(void)
135 exynos_save_cp15(); 135 exynos_save_cp15();
136 136
137 writel(EXYNOS_SLEEP_MAGIC, sysram_ns_base_addr + EXYNOS_BOOT_FLAG); 137 writel(EXYNOS_SLEEP_MAGIC, sysram_ns_base_addr + EXYNOS_BOOT_FLAG);
138 writel(virt_to_phys(exynos_cpu_resume_ns), 138 writel(__pa_symbol(exynos_cpu_resume_ns),
139 sysram_ns_base_addr + EXYNOS_BOOT_ADDR); 139 sysram_ns_base_addr + EXYNOS_BOOT_ADDR);
140 140
141 return cpu_suspend(0, exynos_cpu_suspend); 141 return cpu_suspend(0, exynos_cpu_suspend);
diff --git a/arch/arm/mach-exynos/mcpm-exynos.c b/arch/arm/mach-exynos/mcpm-exynos.c
index f086bf615b29..214a9cfa92e9 100644
--- a/arch/arm/mach-exynos/mcpm-exynos.c
+++ b/arch/arm/mach-exynos/mcpm-exynos.c
@@ -221,7 +221,7 @@ static void exynos_mcpm_setup_entry_point(void)
221 */ 221 */
222 __raw_writel(0xe59f0000, ns_sram_base_addr); /* ldr r0, [pc, #0] */ 222 __raw_writel(0xe59f0000, ns_sram_base_addr); /* ldr r0, [pc, #0] */
223 __raw_writel(0xe12fff10, ns_sram_base_addr + 4); /* bx r0 */ 223 __raw_writel(0xe12fff10, ns_sram_base_addr + 4); /* bx r0 */
224 __raw_writel(virt_to_phys(mcpm_entry_point), ns_sram_base_addr + 8); 224 __raw_writel(__pa_symbol(mcpm_entry_point), ns_sram_base_addr + 8);
225} 225}
226 226
227static struct syscore_ops exynos_mcpm_syscore_ops = { 227static struct syscore_ops exynos_mcpm_syscore_ops = {
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 98ffe1e62ad5..9f4949f7ed88 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -353,7 +353,7 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle)
353 353
354 smp_rmb(); 354 smp_rmb();
355 355
356 boot_addr = virt_to_phys(exynos4_secondary_startup); 356 boot_addr = __pa_symbol(exynos4_secondary_startup);
357 357
358 ret = exynos_set_boot_addr(core_id, boot_addr); 358 ret = exynos_set_boot_addr(core_id, boot_addr);
359 if (ret) 359 if (ret)
@@ -443,7 +443,7 @@ static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
443 443
444 mpidr = cpu_logical_map(i); 444 mpidr = cpu_logical_map(i);
445 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0); 445 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
446 boot_addr = virt_to_phys(exynos4_secondary_startup); 446 boot_addr = __pa_symbol(exynos4_secondary_startup);
447 447
448 ret = exynos_set_boot_addr(core_id, boot_addr); 448 ret = exynos_set_boot_addr(core_id, boot_addr);
449 if (ret) 449 if (ret)
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index 487295f4a56b..1a7e5b5d08d8 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -132,7 +132,7 @@ static void exynos_set_wakeupmask(long mask)
132 132
133static void exynos_cpu_set_boot_vector(long flags) 133static void exynos_cpu_set_boot_vector(long flags)
134{ 134{
135 writel_relaxed(virt_to_phys(exynos_cpu_resume), 135 writel_relaxed(__pa_symbol(exynos_cpu_resume),
136 exynos_boot_vector_addr()); 136 exynos_boot_vector_addr());
137 writel_relaxed(flags, exynos_boot_vector_flag()); 137 writel_relaxed(flags, exynos_boot_vector_flag());
138} 138}
@@ -238,7 +238,7 @@ static int exynos_cpu0_enter_aftr(void)
238 238
239abort: 239abort:
240 if (cpu_online(1)) { 240 if (cpu_online(1)) {
241 unsigned long boot_addr = virt_to_phys(exynos_cpu_resume); 241 unsigned long boot_addr = __pa_symbol(exynos_cpu_resume);
242 242
243 /* 243 /*
244 * Set the boot vector to something non-zero 244 * Set the boot vector to something non-zero
@@ -330,7 +330,7 @@ cpu1_aborted:
330 330
331static void exynos_pre_enter_aftr(void) 331static void exynos_pre_enter_aftr(void)
332{ 332{
333 unsigned long boot_addr = virt_to_phys(exynos_cpu_resume); 333 unsigned long boot_addr = __pa_symbol(exynos_cpu_resume);
334 334
335 (void)exynos_set_boot_addr(1, boot_addr); 335 (void)exynos_set_boot_addr(1, boot_addr);
336} 336}
diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c
index 06332f626565..97765be2cc12 100644
--- a/arch/arm/mach-exynos/suspend.c
+++ b/arch/arm/mach-exynos/suspend.c
@@ -344,7 +344,7 @@ static void exynos_pm_prepare(void)
344 exynos_pm_enter_sleep_mode(); 344 exynos_pm_enter_sleep_mode();
345 345
346 /* ensure at least INFORM0 has the resume address */ 346 /* ensure at least INFORM0 has the resume address */
347 pmu_raw_writel(virt_to_phys(exynos_cpu_resume), S5P_INFORM0); 347 pmu_raw_writel(__pa_symbol(exynos_cpu_resume), S5P_INFORM0);
348} 348}
349 349
350static void exynos3250_pm_prepare(void) 350static void exynos3250_pm_prepare(void)
@@ -361,7 +361,7 @@ static void exynos3250_pm_prepare(void)
361 exynos_pm_enter_sleep_mode(); 361 exynos_pm_enter_sleep_mode();
362 362
363 /* ensure at least INFORM0 has the resume address */ 363 /* ensure at least INFORM0 has the resume address */
364 pmu_raw_writel(virt_to_phys(exynos_cpu_resume), S5P_INFORM0); 364 pmu_raw_writel(__pa_symbol(exynos_cpu_resume), S5P_INFORM0);
365} 365}
366 366
367static void exynos5420_pm_prepare(void) 367static void exynos5420_pm_prepare(void)
@@ -386,7 +386,7 @@ static void exynos5420_pm_prepare(void)
386 386
387 /* ensure at least INFORM0 has the resume address */ 387 /* ensure at least INFORM0 has the resume address */
388 if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM)) 388 if (IS_ENABLED(CONFIG_EXYNOS5420_MCPM))
389 pmu_raw_writel(virt_to_phys(mcpm_entry_point), S5P_INFORM0); 389 pmu_raw_writel(__pa_symbol(mcpm_entry_point), S5P_INFORM0);
390 390
391 tmp = pmu_raw_readl(EXYNOS5_ARM_L2_OPTION); 391 tmp = pmu_raw_readl(EXYNOS5_ARM_L2_OPTION);
392 tmp &= ~EXYNOS5_USE_RETENTION; 392 tmp &= ~EXYNOS5_USE_RETENTION;
diff --git a/arch/arm/mach-hisi/platmcpm.c b/arch/arm/mach-hisi/platmcpm.c
index 4b653a8cb75c..a6c117622d67 100644
--- a/arch/arm/mach-hisi/platmcpm.c
+++ b/arch/arm/mach-hisi/platmcpm.c
@@ -327,7 +327,7 @@ static int __init hip04_smp_init(void)
327 */ 327 */
328 writel_relaxed(hip04_boot_method[0], relocation); 328 writel_relaxed(hip04_boot_method[0], relocation);
329 writel_relaxed(0xa5a5a5a5, relocation + 4); /* magic number */ 329 writel_relaxed(0xa5a5a5a5, relocation + 4); /* magic number */
330 writel_relaxed(virt_to_phys(secondary_startup), relocation + 8); 330 writel_relaxed(__pa_symbol(secondary_startup), relocation + 8);
331 writel_relaxed(0, relocation + 12); 331 writel_relaxed(0, relocation + 12);
332 iounmap(relocation); 332 iounmap(relocation);
333 333
diff --git a/arch/arm/mach-hisi/platsmp.c b/arch/arm/mach-hisi/platsmp.c
index e1d67648d5d0..91bb02dec20f 100644
--- a/arch/arm/mach-hisi/platsmp.c
+++ b/arch/arm/mach-hisi/platsmp.c
@@ -28,7 +28,7 @@ void hi3xxx_set_cpu_jump(int cpu, void *jump_addr)
28 cpu = cpu_logical_map(cpu); 28 cpu = cpu_logical_map(cpu);
29 if (!cpu || !ctrl_base) 29 if (!cpu || !ctrl_base)
30 return; 30 return;
31 writel_relaxed(virt_to_phys(jump_addr), ctrl_base + ((cpu - 1) << 2)); 31 writel_relaxed(__pa_symbol(jump_addr), ctrl_base + ((cpu - 1) << 2));
32} 32}
33 33
34int hi3xxx_get_cpu_jump(int cpu) 34int hi3xxx_get_cpu_jump(int cpu)
@@ -118,7 +118,7 @@ static int hix5hd2_boot_secondary(unsigned int cpu, struct task_struct *idle)
118{ 118{
119 phys_addr_t jumpaddr; 119 phys_addr_t jumpaddr;
120 120
121 jumpaddr = virt_to_phys(secondary_startup); 121 jumpaddr = __pa_symbol(secondary_startup);
122 hix5hd2_set_scu_boot_addr(HIX5HD2_BOOT_ADDRESS, jumpaddr); 122 hix5hd2_set_scu_boot_addr(HIX5HD2_BOOT_ADDRESS, jumpaddr);
123 hix5hd2_set_cpu(cpu, true); 123 hix5hd2_set_cpu(cpu, true);
124 arch_send_wakeup_ipi_mask(cpumask_of(cpu)); 124 arch_send_wakeup_ipi_mask(cpumask_of(cpu));
@@ -156,7 +156,7 @@ static int hip01_boot_secondary(unsigned int cpu, struct task_struct *idle)
156 struct device_node *node; 156 struct device_node *node;
157 157
158 158
159 jumpaddr = virt_to_phys(secondary_startup); 159 jumpaddr = __pa_symbol(secondary_startup);
160 hip01_set_boot_addr(HIP01_BOOT_ADDRESS, jumpaddr); 160 hip01_set_boot_addr(HIP01_BOOT_ADDRESS, jumpaddr);
161 161
162 node = of_find_compatible_node(NULL, NULL, "hisilicon,hip01-sysctrl"); 162 node = of_find_compatible_node(NULL, NULL, "hisilicon,hip01-sysctrl");
diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c
index 711dbbd5badd..c2d1b329fba1 100644
--- a/arch/arm/mach-imx/platsmp.c
+++ b/arch/arm/mach-imx/platsmp.c
@@ -117,7 +117,7 @@ static void __init ls1021a_smp_prepare_cpus(unsigned int max_cpus)
117 dcfg_base = of_iomap(np, 0); 117 dcfg_base = of_iomap(np, 0);
118 BUG_ON(!dcfg_base); 118 BUG_ON(!dcfg_base);
119 119
120 paddr = virt_to_phys(secondary_startup); 120 paddr = __pa_symbol(secondary_startup);
121 writel_relaxed(cpu_to_be32(paddr), dcfg_base + DCFG_CCSR_SCRATCHRW1); 121 writel_relaxed(cpu_to_be32(paddr), dcfg_base + DCFG_CCSR_SCRATCHRW1);
122 122
123 iounmap(dcfg_base); 123 iounmap(dcfg_base);
diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c
index 1515e498d348..e61b1d1027e1 100644
--- a/arch/arm/mach-imx/pm-imx6.c
+++ b/arch/arm/mach-imx/pm-imx6.c
@@ -499,7 +499,7 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)
499 memset(suspend_ocram_base, 0, sizeof(*pm_info)); 499 memset(suspend_ocram_base, 0, sizeof(*pm_info));
500 pm_info = suspend_ocram_base; 500 pm_info = suspend_ocram_base;
501 pm_info->pbase = ocram_pbase; 501 pm_info->pbase = ocram_pbase;
502 pm_info->resume_addr = virt_to_phys(v7_cpu_resume); 502 pm_info->resume_addr = __pa_symbol(v7_cpu_resume);
503 pm_info->pm_info_size = sizeof(*pm_info); 503 pm_info->pm_info_size = sizeof(*pm_info);
504 504
505 /* 505 /*
diff --git a/arch/arm/mach-imx/src.c b/arch/arm/mach-imx/src.c
index 70b083fe934a..495d85d0fe7e 100644
--- a/arch/arm/mach-imx/src.c
+++ b/arch/arm/mach-imx/src.c
@@ -99,7 +99,7 @@ void imx_enable_cpu(int cpu, bool enable)
99void imx_set_cpu_jump(int cpu, void *jump_addr) 99void imx_set_cpu_jump(int cpu, void *jump_addr)
100{ 100{
101 cpu = cpu_logical_map(cpu); 101 cpu = cpu_logical_map(cpu);
102 writel_relaxed(virt_to_phys(jump_addr), 102 writel_relaxed(__pa_symbol(jump_addr),
103 src_base + SRC_GPR1 + cpu * 8); 103 src_base + SRC_GPR1 + cpu * 8);
104} 104}
105 105
diff --git a/arch/arm/mach-mediatek/platsmp.c b/arch/arm/mach-mediatek/platsmp.c
index b821e34474b6..726eb69bb655 100644
--- a/arch/arm/mach-mediatek/platsmp.c
+++ b/arch/arm/mach-mediatek/platsmp.c
@@ -122,7 +122,7 @@ static void __init __mtk_smp_prepare_cpus(unsigned int max_cpus, int trustzone)
122 * write the address of slave startup address into the system-wide 122 * write the address of slave startup address into the system-wide
123 * jump register 123 * jump register
124 */ 124 */
125 writel_relaxed(virt_to_phys(secondary_startup_arm), 125 writel_relaxed(__pa_symbol(secondary_startup_arm),
126 mtk_smp_base + mtk_smp_info->jump_reg); 126 mtk_smp_base + mtk_smp_info->jump_reg);
127} 127}
128 128
diff --git a/arch/arm/mach-mvebu/pm.c b/arch/arm/mach-mvebu/pm.c
index 2990c5269b18..c487be61d6d8 100644
--- a/arch/arm/mach-mvebu/pm.c
+++ b/arch/arm/mach-mvebu/pm.c
@@ -110,7 +110,7 @@ static void mvebu_pm_store_armadaxp_bootinfo(u32 *store_addr)
110{ 110{
111 phys_addr_t resume_pc; 111 phys_addr_t resume_pc;
112 112
113 resume_pc = virt_to_phys(armada_370_xp_cpu_resume); 113 resume_pc = __pa_symbol(armada_370_xp_cpu_resume);
114 114
115 /* 115 /*
116 * The bootloader expects the first two words to be a magic 116 * The bootloader expects the first two words to be a magic
diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c
index f39bd51bce18..27a78c80e5b1 100644
--- a/arch/arm/mach-mvebu/pmsu.c
+++ b/arch/arm/mach-mvebu/pmsu.c
@@ -112,7 +112,7 @@ static const struct of_device_id of_pmsu_table[] = {
112 112
113void mvebu_pmsu_set_cpu_boot_addr(int hw_cpu, void *boot_addr) 113void mvebu_pmsu_set_cpu_boot_addr(int hw_cpu, void *boot_addr)
114{ 114{
115 writel(virt_to_phys(boot_addr), pmsu_mp_base + 115 writel(__pa_symbol(boot_addr), pmsu_mp_base +
116 PMSU_BOOT_ADDR_REDIRECT_OFFSET(hw_cpu)); 116 PMSU_BOOT_ADDR_REDIRECT_OFFSET(hw_cpu));
117} 117}
118 118
diff --git a/arch/arm/mach-mvebu/system-controller.c b/arch/arm/mach-mvebu/system-controller.c
index 76cbc82a7407..04d9ebe6a90a 100644
--- a/arch/arm/mach-mvebu/system-controller.c
+++ b/arch/arm/mach-mvebu/system-controller.c
@@ -153,7 +153,7 @@ void mvebu_system_controller_set_cpu_boot_addr(void *boot_addr)
153 if (of_machine_is_compatible("marvell,armada375")) 153 if (of_machine_is_compatible("marvell,armada375"))
154 mvebu_armada375_smp_wa_init(); 154 mvebu_armada375_smp_wa_init();
155 155
156 writel(virt_to_phys(boot_addr), system_controller_base + 156 writel(__pa_symbol(boot_addr), system_controller_base +
157 mvebu_sc->resume_boot_addr); 157 mvebu_sc->resume_boot_addr);
158} 158}
159#endif 159#endif
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index 1662071bb2cc..bd8089ff929f 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -315,15 +315,15 @@ void omap3_save_scratchpad_contents(void)
315 scratchpad_contents.boot_config_ptr = 0x0; 315 scratchpad_contents.boot_config_ptr = 0x0;
316 if (cpu_is_omap3630()) 316 if (cpu_is_omap3630())
317 scratchpad_contents.public_restore_ptr = 317 scratchpad_contents.public_restore_ptr =
318 virt_to_phys(omap3_restore_3630); 318 __pa_symbol(omap3_restore_3630);
319 else if (omap_rev() != OMAP3430_REV_ES3_0 && 319 else if (omap_rev() != OMAP3430_REV_ES3_0 &&
320 omap_rev() != OMAP3430_REV_ES3_1 && 320 omap_rev() != OMAP3430_REV_ES3_1 &&
321 omap_rev() != OMAP3430_REV_ES3_1_2) 321 omap_rev() != OMAP3430_REV_ES3_1_2)
322 scratchpad_contents.public_restore_ptr = 322 scratchpad_contents.public_restore_ptr =
323 virt_to_phys(omap3_restore); 323 __pa_symbol(omap3_restore);
324 else 324 else
325 scratchpad_contents.public_restore_ptr = 325 scratchpad_contents.public_restore_ptr =
326 virt_to_phys(omap3_restore_es3); 326 __pa_symbol(omap3_restore_es3);
327 327
328 if (omap_type() == OMAP2_DEVICE_TYPE_GP) 328 if (omap_type() == OMAP2_DEVICE_TYPE_GP)
329 scratchpad_contents.secure_ram_restore_ptr = 0x0; 329 scratchpad_contents.secure_ram_restore_ptr = 0x0;
@@ -395,7 +395,7 @@ void omap3_save_scratchpad_contents(void)
395 sdrc_block_contents.flags = 0x0; 395 sdrc_block_contents.flags = 0x0;
396 sdrc_block_contents.block_size = 0x0; 396 sdrc_block_contents.block_size = 0x0;
397 397
398 arm_context_addr = virt_to_phys(omap3_arm_context); 398 arm_context_addr = __pa_symbol(omap3_arm_context);
399 399
400 /* Copy all the contents to the scratchpad location */ 400 /* Copy all the contents to the scratchpad location */
401 scratchpad_address = OMAP2_L4_IO_ADDRESS(OMAP343X_SCRATCHPAD); 401 scratchpad_address = OMAP2_L4_IO_ADDRESS(OMAP343X_SCRATCHPAD);
diff --git a/arch/arm/mach-omap2/omap-mpuss-lowpower.c b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
index 7d62ad48c7c9..113ab2dd2ee9 100644
--- a/arch/arm/mach-omap2/omap-mpuss-lowpower.c
+++ b/arch/arm/mach-omap2/omap-mpuss-lowpower.c
@@ -273,7 +273,7 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state)
273 cpu_clear_prev_logic_pwrst(cpu); 273 cpu_clear_prev_logic_pwrst(cpu);
274 pwrdm_set_next_pwrst(pm_info->pwrdm, power_state); 274 pwrdm_set_next_pwrst(pm_info->pwrdm, power_state);
275 pwrdm_set_logic_retst(pm_info->pwrdm, cpu_logic_state); 275 pwrdm_set_logic_retst(pm_info->pwrdm, cpu_logic_state);
276 set_cpu_wakeup_addr(cpu, virt_to_phys(omap_pm_ops.resume)); 276 set_cpu_wakeup_addr(cpu, __pa_symbol(omap_pm_ops.resume));
277 omap_pm_ops.scu_prepare(cpu, power_state); 277 omap_pm_ops.scu_prepare(cpu, power_state);
278 l2x0_pwrst_prepare(cpu, save_state); 278 l2x0_pwrst_prepare(cpu, save_state);
279 279
@@ -325,7 +325,7 @@ int omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state)
325 325
326 pwrdm_clear_all_prev_pwrst(pm_info->pwrdm); 326 pwrdm_clear_all_prev_pwrst(pm_info->pwrdm);
327 pwrdm_set_next_pwrst(pm_info->pwrdm, power_state); 327 pwrdm_set_next_pwrst(pm_info->pwrdm, power_state);
328 set_cpu_wakeup_addr(cpu, virt_to_phys(omap_pm_ops.hotplug_restart)); 328 set_cpu_wakeup_addr(cpu, __pa_symbol(omap_pm_ops.hotplug_restart));
329 omap_pm_ops.scu_prepare(cpu, power_state); 329 omap_pm_ops.scu_prepare(cpu, power_state);
330 330
331 /* 331 /*
@@ -467,13 +467,13 @@ void __init omap4_mpuss_early_init(void)
467 sar_base = omap4_get_sar_ram_base(); 467 sar_base = omap4_get_sar_ram_base();
468 468
469 if (cpu_is_omap443x()) 469 if (cpu_is_omap443x())
470 startup_pa = virt_to_phys(omap4_secondary_startup); 470 startup_pa = __pa_symbol(omap4_secondary_startup);
471 else if (cpu_is_omap446x()) 471 else if (cpu_is_omap446x())
472 startup_pa = virt_to_phys(omap4460_secondary_startup); 472 startup_pa = __pa_symbol(omap4460_secondary_startup);
473 else if ((__boot_cpu_mode & MODE_MASK) == HYP_MODE) 473 else if ((__boot_cpu_mode & MODE_MASK) == HYP_MODE)
474 startup_pa = virt_to_phys(omap5_secondary_hyp_startup); 474 startup_pa = __pa_symbol(omap5_secondary_hyp_startup);
475 else 475 else
476 startup_pa = virt_to_phys(omap5_secondary_startup); 476 startup_pa = __pa_symbol(omap5_secondary_startup);
477 477
478 if (cpu_is_omap44xx()) 478 if (cpu_is_omap44xx())
479 writel_relaxed(startup_pa, sar_base + 479 writel_relaxed(startup_pa, sar_base +
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index b4de3da6dffa..003353b0b794 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -316,9 +316,9 @@ static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
316 * A barrier is added to ensure that write buffer is drained 316 * A barrier is added to ensure that write buffer is drained
317 */ 317 */
318 if (omap_secure_apis_support()) 318 if (omap_secure_apis_support())
319 omap_auxcoreboot_addr(virt_to_phys(cfg.startup_addr)); 319 omap_auxcoreboot_addr(__pa_symbol(cfg.startup_addr));
320 else 320 else
321 writel_relaxed(virt_to_phys(cfg.startup_addr), 321 writel_relaxed(__pa_symbol(cfg.startup_addr),
322 base + OMAP_AUX_CORE_BOOT_1); 322 base + OMAP_AUX_CORE_BOOT_1);
323} 323}
324 324
diff --git a/arch/arm/mach-prima2/platsmp.c b/arch/arm/mach-prima2/platsmp.c
index 0875b99add18..75ef5d4be554 100644
--- a/arch/arm/mach-prima2/platsmp.c
+++ b/arch/arm/mach-prima2/platsmp.c
@@ -65,7 +65,7 @@ static int sirfsoc_boot_secondary(unsigned int cpu, struct task_struct *idle)
65 * waiting for. This would wake up the secondary core from WFE 65 * waiting for. This would wake up the secondary core from WFE
66 */ 66 */
67#define SIRFSOC_CPU1_JUMPADDR_OFFSET 0x2bc 67#define SIRFSOC_CPU1_JUMPADDR_OFFSET 0x2bc
68 __raw_writel(virt_to_phys(sirfsoc_secondary_startup), 68 __raw_writel(__pa_symbol(sirfsoc_secondary_startup),
69 clk_base + SIRFSOC_CPU1_JUMPADDR_OFFSET); 69 clk_base + SIRFSOC_CPU1_JUMPADDR_OFFSET);
70 70
71#define SIRFSOC_CPU1_WAKEMAGIC_OFFSET 0x2b8 71#define SIRFSOC_CPU1_WAKEMAGIC_OFFSET 0x2b8
diff --git a/arch/arm/mach-prima2/pm.c b/arch/arm/mach-prima2/pm.c
index 83e94c95e314..b0bcf1ff02dd 100644
--- a/arch/arm/mach-prima2/pm.c
+++ b/arch/arm/mach-prima2/pm.c
@@ -54,7 +54,7 @@ static void sirfsoc_set_sleep_mode(u32 mode)
54 54
55static int sirfsoc_pre_suspend_power_off(void) 55static int sirfsoc_pre_suspend_power_off(void)
56{ 56{
57 u32 wakeup_entry = virt_to_phys(cpu_resume); 57 u32 wakeup_entry = __pa_symbol(cpu_resume);
58 58
59 sirfsoc_rtc_iobrg_writel(wakeup_entry, sirfsoc_pwrc_base + 59 sirfsoc_rtc_iobrg_writel(wakeup_entry, sirfsoc_pwrc_base +
60 SIRFSOC_PWRC_SCRATCH_PAD1); 60 SIRFSOC_PWRC_SCRATCH_PAD1);
diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c
index 9c308de158c6..29630061e700 100644
--- a/arch/arm/mach-pxa/palmz72.c
+++ b/arch/arm/mach-pxa/palmz72.c
@@ -249,7 +249,7 @@ static int palmz72_pm_suspend(void)
249 store_ptr = *PALMZ72_SAVE_DWORD; 249 store_ptr = *PALMZ72_SAVE_DWORD;
250 250
251 /* Setting PSPR to a proper value */ 251 /* Setting PSPR to a proper value */
252 PSPR = virt_to_phys(&palmz72_resume_info); 252 PSPR = __pa_symbol(&palmz72_resume_info);
253 253
254 return 0; 254 return 0;
255} 255}
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index c725baf119e1..ba431fad5c47 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -85,7 +85,7 @@ static void pxa25x_cpu_pm_enter(suspend_state_t state)
85static int pxa25x_cpu_pm_prepare(void) 85static int pxa25x_cpu_pm_prepare(void)
86{ 86{
87 /* set resume return address */ 87 /* set resume return address */
88 PSPR = virt_to_phys(cpu_resume); 88 PSPR = __pa_symbol(cpu_resume);
89 return 0; 89 return 0;
90} 90}
91 91
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index c0185c5c5a08..9b69be4e9fe3 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -168,7 +168,7 @@ static int pxa27x_cpu_pm_valid(suspend_state_t state)
168static int pxa27x_cpu_pm_prepare(void) 168static int pxa27x_cpu_pm_prepare(void)
169{ 169{
170 /* set resume return address */ 170 /* set resume return address */
171 PSPR = virt_to_phys(cpu_resume); 171 PSPR = __pa_symbol(cpu_resume);
172 return 0; 172 return 0;
173} 173}
174 174
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 87acc96388c7..0cc9f124c9ac 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -123,7 +123,7 @@ static void pxa3xx_cpu_pm_suspend(void)
123 PSPR = 0x5c014000; 123 PSPR = 0x5c014000;
124 124
125 /* overwrite with the resume address */ 125 /* overwrite with the resume address */
126 *p = virt_to_phys(cpu_resume); 126 *p = __pa_symbol(cpu_resume);
127 127
128 cpu_suspend(0, pxa3xx_finish_suspend); 128 cpu_suspend(0, pxa3xx_finish_suspend);
129 129
diff --git a/arch/arm/mach-realview/platsmp-dt.c b/arch/arm/mach-realview/platsmp-dt.c
index 70ca99eb52c6..c242423bf8db 100644
--- a/arch/arm/mach-realview/platsmp-dt.c
+++ b/arch/arm/mach-realview/platsmp-dt.c
@@ -76,7 +76,7 @@ static void __init realview_smp_prepare_cpus(unsigned int max_cpus)
76 } 76 }
77 /* Put the boot address in this magic register */ 77 /* Put the boot address in this magic register */
78 regmap_write(map, REALVIEW_SYS_FLAGSSET_OFFSET, 78 regmap_write(map, REALVIEW_SYS_FLAGSSET_OFFSET,
79 virt_to_phys(versatile_secondary_startup)); 79 __pa_symbol(versatile_secondary_startup));
80} 80}
81 81
82static const struct smp_operations realview_dt_smp_ops __initconst = { 82static const struct smp_operations realview_dt_smp_ops __initconst = {
diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c
index 4d827a069d49..3abafdbdd7f4 100644
--- a/arch/arm/mach-rockchip/platsmp.c
+++ b/arch/arm/mach-rockchip/platsmp.c
@@ -156,7 +156,7 @@ static int rockchip_boot_secondary(unsigned int cpu, struct task_struct *idle)
156 */ 156 */
157 mdelay(1); /* ensure the cpus other than cpu0 to startup */ 157 mdelay(1); /* ensure the cpus other than cpu0 to startup */
158 158
159 writel(virt_to_phys(secondary_startup), sram_base_addr + 8); 159 writel(__pa_symbol(secondary_startup), sram_base_addr + 8);
160 writel(0xDEADBEAF, sram_base_addr + 4); 160 writel(0xDEADBEAF, sram_base_addr + 4);
161 dsb_sev(); 161 dsb_sev();
162 } 162 }
@@ -195,7 +195,7 @@ static int __init rockchip_smp_prepare_sram(struct device_node *node)
195 } 195 }
196 196
197 /* set the boot function for the sram code */ 197 /* set the boot function for the sram code */
198 rockchip_boot_fn = virt_to_phys(secondary_startup); 198 rockchip_boot_fn = __pa_symbol(secondary_startup);
199 199
200 /* copy the trampoline to sram, that runs during startup of the core */ 200 /* copy the trampoline to sram, that runs during startup of the core */
201 memcpy(sram_base_addr, &rockchip_secondary_trampoline, trampoline_sz); 201 memcpy(sram_base_addr, &rockchip_secondary_trampoline, trampoline_sz);
diff --git a/arch/arm/mach-rockchip/pm.c b/arch/arm/mach-rockchip/pm.c
index bee8c8051929..0592534e0b88 100644
--- a/arch/arm/mach-rockchip/pm.c
+++ b/arch/arm/mach-rockchip/pm.c
@@ -62,7 +62,7 @@ static inline u32 rk3288_l2_config(void)
62static void rk3288_config_bootdata(void) 62static void rk3288_config_bootdata(void)
63{ 63{
64 rkpm_bootdata_cpusp = rk3288_bootram_phy + (SZ_4K - 8); 64 rkpm_bootdata_cpusp = rk3288_bootram_phy + (SZ_4K - 8);
65 rkpm_bootdata_cpu_code = virt_to_phys(cpu_resume); 65 rkpm_bootdata_cpu_code = __pa_symbol(cpu_resume);
66 66
67 rkpm_bootdata_l2ctlr_f = 1; 67 rkpm_bootdata_l2ctlr_f = 1;
68 rkpm_bootdata_l2ctlr = rk3288_l2_config(); 68 rkpm_bootdata_l2ctlr = rk3288_l2_config();
diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c24xx/mach-jive.c
index 895aca225952..f5b5c49b56ac 100644
--- a/arch/arm/mach-s3c24xx/mach-jive.c
+++ b/arch/arm/mach-s3c24xx/mach-jive.c
@@ -484,7 +484,7 @@ static int jive_pm_suspend(void)
484 * correct address to resume from. */ 484 * correct address to resume from. */
485 485
486 __raw_writel(0x2BED, S3C2412_INFORM0); 486 __raw_writel(0x2BED, S3C2412_INFORM0);
487 __raw_writel(virt_to_phys(s3c_cpu_resume), S3C2412_INFORM1); 487 __raw_writel(__pa_symbol(s3c_cpu_resume), S3C2412_INFORM1);
488 488
489 return 0; 489 return 0;
490} 490}
diff --git a/arch/arm/mach-s3c24xx/pm-s3c2410.c b/arch/arm/mach-s3c24xx/pm-s3c2410.c
index 20e481d8a33a..a4588daeddb0 100644
--- a/arch/arm/mach-s3c24xx/pm-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/pm-s3c2410.c
@@ -45,7 +45,7 @@ static void s3c2410_pm_prepare(void)
45{ 45{
46 /* ensure at least GSTATUS3 has the resume address */ 46 /* ensure at least GSTATUS3 has the resume address */
47 47
48 __raw_writel(virt_to_phys(s3c_cpu_resume), S3C2410_GSTATUS3); 48 __raw_writel(__pa_symbol(s3c_cpu_resume), S3C2410_GSTATUS3);
49 49
50 S3C_PMDBG("GSTATUS3 0x%08x\n", __raw_readl(S3C2410_GSTATUS3)); 50 S3C_PMDBG("GSTATUS3 0x%08x\n", __raw_readl(S3C2410_GSTATUS3));
51 S3C_PMDBG("GSTATUS4 0x%08x\n", __raw_readl(S3C2410_GSTATUS4)); 51 S3C_PMDBG("GSTATUS4 0x%08x\n", __raw_readl(S3C2410_GSTATUS4));
diff --git a/arch/arm/mach-s3c24xx/pm-s3c2416.c b/arch/arm/mach-s3c24xx/pm-s3c2416.c
index c0e328e37bd6..b5bbf0d5985c 100644
--- a/arch/arm/mach-s3c24xx/pm-s3c2416.c
+++ b/arch/arm/mach-s3c24xx/pm-s3c2416.c
@@ -48,7 +48,7 @@ static void s3c2416_pm_prepare(void)
48 * correct address to resume from. 48 * correct address to resume from.
49 */ 49 */
50 __raw_writel(0x2BED, S3C2412_INFORM0); 50 __raw_writel(0x2BED, S3C2412_INFORM0);
51 __raw_writel(virt_to_phys(s3c_cpu_resume), S3C2412_INFORM1); 51 __raw_writel(__pa_symbol(s3c_cpu_resume), S3C2412_INFORM1);
52} 52}
53 53
54static int s3c2416_pm_add(struct device *dev, struct subsys_interface *sif) 54static int s3c2416_pm_add(struct device *dev, struct subsys_interface *sif)
diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c
index 59d91b83b03d..945a9d1e1a71 100644
--- a/arch/arm/mach-s3c64xx/pm.c
+++ b/arch/arm/mach-s3c64xx/pm.c
@@ -304,7 +304,7 @@ static void s3c64xx_pm_prepare(void)
304 wake_irqs, ARRAY_SIZE(wake_irqs)); 304 wake_irqs, ARRAY_SIZE(wake_irqs));
305 305
306 /* store address of resume. */ 306 /* store address of resume. */
307 __raw_writel(virt_to_phys(s3c_cpu_resume), S3C64XX_INFORM0); 307 __raw_writel(__pa_symbol(s3c_cpu_resume), S3C64XX_INFORM0);
308 308
309 /* ensure previous wakeup state is cleared before sleeping */ 309 /* ensure previous wakeup state is cleared before sleeping */
310 __raw_writel(__raw_readl(S3C64XX_WAKEUP_STAT), S3C64XX_WAKEUP_STAT); 310 __raw_writel(__raw_readl(S3C64XX_WAKEUP_STAT), S3C64XX_WAKEUP_STAT);
diff --git a/arch/arm/mach-s5pv210/pm.c b/arch/arm/mach-s5pv210/pm.c
index 21b4b13c5ab7..2d5f08015e34 100644
--- a/arch/arm/mach-s5pv210/pm.c
+++ b/arch/arm/mach-s5pv210/pm.c
@@ -69,7 +69,7 @@ static void s5pv210_pm_prepare(void)
69 __raw_writel(s5pv210_irqwake_intmask, S5P_WAKEUP_MASK); 69 __raw_writel(s5pv210_irqwake_intmask, S5P_WAKEUP_MASK);
70 70
71 /* ensure at least INFORM0 has the resume address */ 71 /* ensure at least INFORM0 has the resume address */
72 __raw_writel(virt_to_phys(s5pv210_cpu_resume), S5P_INFORM0); 72 __raw_writel(__pa_symbol(s5pv210_cpu_resume), S5P_INFORM0);
73 73
74 tmp = __raw_readl(S5P_SLEEP_CFG); 74 tmp = __raw_readl(S5P_SLEEP_CFG);
75 tmp &= ~(S5P_SLEEP_CFG_OSC_EN | S5P_SLEEP_CFG_USBOSC_EN); 75 tmp &= ~(S5P_SLEEP_CFG_OSC_EN | S5P_SLEEP_CFG_USBOSC_EN);
diff --git a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c
index 34853d5dfda2..9a7079f565bd 100644
--- a/arch/arm/mach-sa1100/pm.c
+++ b/arch/arm/mach-sa1100/pm.c
@@ -73,7 +73,7 @@ static int sa11x0_pm_enter(suspend_state_t state)
73 RCSR = RCSR_HWR | RCSR_SWR | RCSR_WDR | RCSR_SMR; 73 RCSR = RCSR_HWR | RCSR_SWR | RCSR_WDR | RCSR_SMR;
74 74
75 /* set resume return address */ 75 /* set resume return address */
76 PSPR = virt_to_phys(cpu_resume); 76 PSPR = __pa_symbol(cpu_resume);
77 77
78 /* go zzz */ 78 /* go zzz */
79 cpu_suspend(0, sa1100_finish_suspend); 79 cpu_suspend(0, sa1100_finish_suspend);
diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
index 0c6bb458b7a4..71729b8d1900 100644
--- a/arch/arm/mach-shmobile/platsmp-apmu.c
+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
@@ -171,7 +171,7 @@ static void apmu_parse_dt(void (*fn)(struct resource *res, int cpu, int bit))
171static void __init shmobile_smp_apmu_setup_boot(void) 171static void __init shmobile_smp_apmu_setup_boot(void)
172{ 172{
173 /* install boot code shared by all CPUs */ 173 /* install boot code shared by all CPUs */
174 shmobile_boot_fn = virt_to_phys(shmobile_smp_boot); 174 shmobile_boot_fn = __pa_symbol(shmobile_smp_boot);
175} 175}
176 176
177void __init shmobile_smp_apmu_prepare_cpus(unsigned int max_cpus, 177void __init shmobile_smp_apmu_prepare_cpus(unsigned int max_cpus,
@@ -185,7 +185,7 @@ void __init shmobile_smp_apmu_prepare_cpus(unsigned int max_cpus,
185int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle) 185int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle)
186{ 186{
187 /* For this particular CPU register boot vector */ 187 /* For this particular CPU register boot vector */
188 shmobile_smp_hook(cpu, virt_to_phys(secondary_startup), 0); 188 shmobile_smp_hook(cpu, __pa_symbol(secondary_startup), 0);
189 189
190 return apmu_wrap(cpu, apmu_power_on); 190 return apmu_wrap(cpu, apmu_power_on);
191} 191}
@@ -301,7 +301,7 @@ int shmobile_smp_apmu_cpu_kill(unsigned int cpu)
301#if defined(CONFIG_SUSPEND) 301#if defined(CONFIG_SUSPEND)
302static int shmobile_smp_apmu_do_suspend(unsigned long cpu) 302static int shmobile_smp_apmu_do_suspend(unsigned long cpu)
303{ 303{
304 shmobile_smp_hook(cpu, virt_to_phys(cpu_resume), 0); 304 shmobile_smp_hook(cpu, __pa_symbol(cpu_resume), 0);
305 shmobile_smp_apmu_cpu_shutdown(cpu); 305 shmobile_smp_apmu_cpu_shutdown(cpu);
306 cpu_do_idle(); /* WFI selects Core Standby */ 306 cpu_do_idle(); /* WFI selects Core Standby */
307 return 1; 307 return 1;
diff --git a/arch/arm/mach-shmobile/platsmp-scu.c b/arch/arm/mach-shmobile/platsmp-scu.c
index d1ecaf37d142..f1a1efde4beb 100644
--- a/arch/arm/mach-shmobile/platsmp-scu.c
+++ b/arch/arm/mach-shmobile/platsmp-scu.c
@@ -24,7 +24,7 @@ static void __iomem *shmobile_scu_base;
24static int shmobile_scu_cpu_prepare(unsigned int cpu) 24static int shmobile_scu_cpu_prepare(unsigned int cpu)
25{ 25{
26 /* For this particular CPU register SCU SMP boot vector */ 26 /* For this particular CPU register SCU SMP boot vector */
27 shmobile_smp_hook(cpu, virt_to_phys(shmobile_boot_scu), 27 shmobile_smp_hook(cpu, __pa_symbol(shmobile_boot_scu),
28 shmobile_scu_base_phys); 28 shmobile_scu_base_phys);
29 return 0; 29 return 0;
30} 30}
@@ -33,7 +33,7 @@ void __init shmobile_smp_scu_prepare_cpus(phys_addr_t scu_base_phys,
33 unsigned int max_cpus) 33 unsigned int max_cpus)
34{ 34{
35 /* install boot code shared by all CPUs */ 35 /* install boot code shared by all CPUs */
36 shmobile_boot_fn = virt_to_phys(shmobile_smp_boot); 36 shmobile_boot_fn = __pa_symbol(shmobile_smp_boot);
37 37
38 /* enable SCU and cache coherency on booting CPU */ 38 /* enable SCU and cache coherency on booting CPU */
39 shmobile_scu_base_phys = scu_base_phys; 39 shmobile_scu_base_phys = scu_base_phys;
diff --git a/arch/arm/mach-socfpga/platsmp.c b/arch/arm/mach-socfpga/platsmp.c
index 07945748b571..0ee76772b507 100644
--- a/arch/arm/mach-socfpga/platsmp.c
+++ b/arch/arm/mach-socfpga/platsmp.c
@@ -40,7 +40,7 @@ static int socfpga_boot_secondary(unsigned int cpu, struct task_struct *idle)
40 40
41 memcpy(phys_to_virt(0), &secondary_trampoline, trampoline_size); 41 memcpy(phys_to_virt(0), &secondary_trampoline, trampoline_size);
42 42
43 writel(virt_to_phys(secondary_startup), 43 writel(__pa_symbol(secondary_startup),
44 sys_manager_base_addr + (socfpga_cpu1start_addr & 0x000000ff)); 44 sys_manager_base_addr + (socfpga_cpu1start_addr & 0x000000ff));
45 45
46 flush_cache_all(); 46 flush_cache_all();
@@ -63,7 +63,7 @@ static int socfpga_a10_boot_secondary(unsigned int cpu, struct task_struct *idle
63 SOCFPGA_A10_RSTMGR_MODMPURST); 63 SOCFPGA_A10_RSTMGR_MODMPURST);
64 memcpy(phys_to_virt(0), &secondary_trampoline, trampoline_size); 64 memcpy(phys_to_virt(0), &secondary_trampoline, trampoline_size);
65 65
66 writel(virt_to_phys(secondary_startup), 66 writel(__pa_symbol(secondary_startup),
67 sys_manager_base_addr + (socfpga_cpu1start_addr & 0x00000fff)); 67 sys_manager_base_addr + (socfpga_cpu1start_addr & 0x00000fff));
68 68
69 flush_cache_all(); 69 flush_cache_all();
diff --git a/arch/arm/mach-spear/platsmp.c b/arch/arm/mach-spear/platsmp.c
index 8d1e2d551786..39038a03836a 100644
--- a/arch/arm/mach-spear/platsmp.c
+++ b/arch/arm/mach-spear/platsmp.c
@@ -117,7 +117,7 @@ static void __init spear13xx_smp_prepare_cpus(unsigned int max_cpus)
117 * (presently it is in SRAM). The BootMonitor waits until it receives a 117 * (presently it is in SRAM). The BootMonitor waits until it receives a
118 * soft interrupt, and then the secondary CPU branches to this address. 118 * soft interrupt, and then the secondary CPU branches to this address.
119 */ 119 */
120 __raw_writel(virt_to_phys(spear13xx_secondary_startup), SYS_LOCATION); 120 __raw_writel(__pa_symbol(spear13xx_secondary_startup), SYS_LOCATION);
121} 121}
122 122
123const struct smp_operations spear13xx_smp_ops __initconst = { 123const struct smp_operations spear13xx_smp_ops __initconst = {
diff --git a/arch/arm/mach-sti/platsmp.c b/arch/arm/mach-sti/platsmp.c
index ea5a2277ee46..231f19e17436 100644
--- a/arch/arm/mach-sti/platsmp.c
+++ b/arch/arm/mach-sti/platsmp.c
@@ -103,7 +103,7 @@ static void __init sti_smp_prepare_cpus(unsigned int max_cpus)
103 u32 __iomem *cpu_strt_ptr; 103 u32 __iomem *cpu_strt_ptr;
104 u32 release_phys; 104 u32 release_phys;
105 int cpu; 105 int cpu;
106 unsigned long entry_pa = virt_to_phys(sti_secondary_startup); 106 unsigned long entry_pa = __pa_symbol(sti_secondary_startup);
107 107
108 np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu"); 108 np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu");
109 109
diff --git a/arch/arm/mach-sunxi/platsmp.c b/arch/arm/mach-sunxi/platsmp.c
index 6642267812c9..8fb5088464db 100644
--- a/arch/arm/mach-sunxi/platsmp.c
+++ b/arch/arm/mach-sunxi/platsmp.c
@@ -80,7 +80,7 @@ static int sun6i_smp_boot_secondary(unsigned int cpu,
80 spin_lock(&cpu_lock); 80 spin_lock(&cpu_lock);
81 81
82 /* Set CPU boot address */ 82 /* Set CPU boot address */
83 writel(virt_to_phys(secondary_startup), 83 writel(__pa_symbol(secondary_startup),
84 cpucfg_membase + CPUCFG_PRIVATE0_REG); 84 cpucfg_membase + CPUCFG_PRIVATE0_REG);
85 85
86 /* Assert the CPU core in reset */ 86 /* Assert the CPU core in reset */
@@ -162,7 +162,7 @@ static int sun8i_smp_boot_secondary(unsigned int cpu,
162 spin_lock(&cpu_lock); 162 spin_lock(&cpu_lock);
163 163
164 /* Set CPU boot address */ 164 /* Set CPU boot address */
165 writel(virt_to_phys(secondary_startup), 165 writel(__pa_symbol(secondary_startup),
166 cpucfg_membase + CPUCFG_PRIVATE0_REG); 166 cpucfg_membase + CPUCFG_PRIVATE0_REG);
167 167
168 /* Assert the CPU core in reset */ 168 /* Assert the CPU core in reset */
diff --git a/arch/arm/mach-tango/platsmp.c b/arch/arm/mach-tango/platsmp.c
index 98c62a4a8623..2f0c6c050fed 100644
--- a/arch/arm/mach-tango/platsmp.c
+++ b/arch/arm/mach-tango/platsmp.c
@@ -5,7 +5,7 @@
5 5
6static int tango_boot_secondary(unsigned int cpu, struct task_struct *idle) 6static int tango_boot_secondary(unsigned int cpu, struct task_struct *idle)
7{ 7{
8 tango_set_aux_boot_addr(virt_to_phys(secondary_startup)); 8 tango_set_aux_boot_addr(__pa_symbol(secondary_startup));
9 tango_start_aux_core(cpu); 9 tango_start_aux_core(cpu);
10 return 0; 10 return 0;
11} 11}
diff --git a/arch/arm/mach-tango/pm.c b/arch/arm/mach-tango/pm.c
index b05c6d6f99d0..406c0814eb6e 100644
--- a/arch/arm/mach-tango/pm.c
+++ b/arch/arm/mach-tango/pm.c
@@ -5,7 +5,7 @@
5 5
6static int tango_pm_powerdown(unsigned long arg) 6static int tango_pm_powerdown(unsigned long arg)
7{ 7{
8 tango_suspend(virt_to_phys(cpu_resume)); 8 tango_suspend(__pa_symbol(cpu_resume));
9 9
10 return -EIO; /* tango_suspend has failed */ 10 return -EIO; /* tango_suspend has failed */
11} 11}
diff --git a/arch/arm/mach-tegra/reset.c b/arch/arm/mach-tegra/reset.c
index 6fd9db54887e..dc558892753c 100644
--- a/arch/arm/mach-tegra/reset.c
+++ b/arch/arm/mach-tegra/reset.c
@@ -94,14 +94,14 @@ void __init tegra_cpu_reset_handler_init(void)
94 __tegra_cpu_reset_handler_data[TEGRA_RESET_MASK_PRESENT] = 94 __tegra_cpu_reset_handler_data[TEGRA_RESET_MASK_PRESENT] =
95 *((u32 *)cpu_possible_mask); 95 *((u32 *)cpu_possible_mask);
96 __tegra_cpu_reset_handler_data[TEGRA_RESET_STARTUP_SECONDARY] = 96 __tegra_cpu_reset_handler_data[TEGRA_RESET_STARTUP_SECONDARY] =
97 virt_to_phys((void *)secondary_startup); 97 __pa_symbol((void *)secondary_startup);
98#endif 98#endif
99 99
100#ifdef CONFIG_PM_SLEEP 100#ifdef CONFIG_PM_SLEEP
101 __tegra_cpu_reset_handler_data[TEGRA_RESET_STARTUP_LP1] = 101 __tegra_cpu_reset_handler_data[TEGRA_RESET_STARTUP_LP1] =
102 TEGRA_IRAM_LPx_RESUME_AREA; 102 TEGRA_IRAM_LPx_RESUME_AREA;
103 __tegra_cpu_reset_handler_data[TEGRA_RESET_STARTUP_LP2] = 103 __tegra_cpu_reset_handler_data[TEGRA_RESET_STARTUP_LP2] =
104 virt_to_phys((void *)tegra_resume); 104 __pa_symbol((void *)tegra_resume);
105#endif 105#endif
106 106
107 tegra_cpu_reset_handler_enable(); 107 tegra_cpu_reset_handler_enable();
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
index 8f2f615ff958..8c8f26389067 100644
--- a/arch/arm/mach-ux500/platsmp.c
+++ b/arch/arm/mach-ux500/platsmp.c
@@ -54,7 +54,7 @@ static void wakeup_secondary(void)
54 * backup ram register at offset 0x1FF0, which is what boot rom code 54 * backup ram register at offset 0x1FF0, which is what boot rom code
55 * is waiting for. This will wake up the secondary core from WFE. 55 * is waiting for. This will wake up the secondary core from WFE.
56 */ 56 */
57 writel(virt_to_phys(secondary_startup), 57 writel(__pa_symbol(secondary_startup),
58 backupram + UX500_CPU1_JUMPADDR_OFFSET); 58 backupram + UX500_CPU1_JUMPADDR_OFFSET);
59 writel(0xA1FEED01, 59 writel(0xA1FEED01,
60 backupram + UX500_CPU1_WAKEMAGIC_OFFSET); 60 backupram + UX500_CPU1_WAKEMAGIC_OFFSET);
diff --git a/arch/arm/mach-vexpress/dcscb.c b/arch/arm/mach-vexpress/dcscb.c
index 5cedcf572104..ee2a0faafaa1 100644
--- a/arch/arm/mach-vexpress/dcscb.c
+++ b/arch/arm/mach-vexpress/dcscb.c
@@ -166,7 +166,7 @@ static int __init dcscb_init(void)
166 * Future entries into the kernel can now go 166 * Future entries into the kernel can now go
167 * through the cluster entry vectors. 167 * through the cluster entry vectors.
168 */ 168 */
169 vexpress_flags_set(virt_to_phys(mcpm_entry_point)); 169 vexpress_flags_set(__pa_symbol(mcpm_entry_point));
170 170
171 return 0; 171 return 0;
172} 172}
diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-vexpress/platsmp.c
index 98e29dee91e8..742499bac6d0 100644
--- a/arch/arm/mach-vexpress/platsmp.c
+++ b/arch/arm/mach-vexpress/platsmp.c
@@ -79,7 +79,7 @@ static void __init vexpress_smp_dt_prepare_cpus(unsigned int max_cpus)
79 * until it receives a soft interrupt, and then the 79 * until it receives a soft interrupt, and then the
80 * secondary CPU branches to this address. 80 * secondary CPU branches to this address.
81 */ 81 */
82 vexpress_flags_set(virt_to_phys(versatile_secondary_startup)); 82 vexpress_flags_set(__pa_symbol(versatile_secondary_startup));
83} 83}
84 84
85const struct smp_operations vexpress_smp_dt_ops __initconst = { 85const struct smp_operations vexpress_smp_dt_ops __initconst = {
diff --git a/arch/arm/mach-vexpress/tc2_pm.c b/arch/arm/mach-vexpress/tc2_pm.c
index 1aa4ccece69f..9b5f3c427086 100644
--- a/arch/arm/mach-vexpress/tc2_pm.c
+++ b/arch/arm/mach-vexpress/tc2_pm.c
@@ -54,7 +54,7 @@ static int tc2_pm_cpu_powerup(unsigned int cpu, unsigned int cluster)
54 if (cluster >= TC2_CLUSTERS || cpu >= tc2_nr_cpus[cluster]) 54 if (cluster >= TC2_CLUSTERS || cpu >= tc2_nr_cpus[cluster])
55 return -EINVAL; 55 return -EINVAL;
56 ve_spc_set_resume_addr(cluster, cpu, 56 ve_spc_set_resume_addr(cluster, cpu,
57 virt_to_phys(mcpm_entry_point)); 57 __pa_symbol(mcpm_entry_point));
58 ve_spc_cpu_wakeup_irq(cluster, cpu, true); 58 ve_spc_cpu_wakeup_irq(cluster, cpu, true);
59 return 0; 59 return 0;
60} 60}
@@ -159,7 +159,7 @@ static int tc2_pm_wait_for_powerdown(unsigned int cpu, unsigned int cluster)
159 159
160static void tc2_pm_cpu_suspend_prepare(unsigned int cpu, unsigned int cluster) 160static void tc2_pm_cpu_suspend_prepare(unsigned int cpu, unsigned int cluster)
161{ 161{
162 ve_spc_set_resume_addr(cluster, cpu, virt_to_phys(mcpm_entry_point)); 162 ve_spc_set_resume_addr(cluster, cpu, __pa_symbol(mcpm_entry_point));
163} 163}
164 164
165static void tc2_pm_cpu_is_up(unsigned int cpu, unsigned int cluster) 165static void tc2_pm_cpu_is_up(unsigned int cpu, unsigned int cluster)
diff --git a/arch/arm/mach-zx/platsmp.c b/arch/arm/mach-zx/platsmp.c
index 0297f92084e0..afb9a82dedc3 100644
--- a/arch/arm/mach-zx/platsmp.c
+++ b/arch/arm/mach-zx/platsmp.c
@@ -76,7 +76,7 @@ void __init zx_smp_prepare_cpus(unsigned int max_cpus)
76 * until it receives a soft interrupt, and then the 76 * until it receives a soft interrupt, and then the
77 * secondary CPU branches to this address. 77 * secondary CPU branches to this address.
78 */ 78 */
79 __raw_writel(virt_to_phys(zx_secondary_startup), 79 __raw_writel(__pa_symbol(zx_secondary_startup),
80 aonsysctrl_base + AON_SYS_CTRL_RESERVED1); 80 aonsysctrl_base + AON_SYS_CTRL_RESERVED1);
81 81
82 iounmap(aonsysctrl_base); 82 iounmap(aonsysctrl_base);
@@ -94,7 +94,7 @@ void __init zx_smp_prepare_cpus(unsigned int max_cpus)
94 94
95 /* Map the first 4 KB IRAM for suspend usage */ 95 /* Map the first 4 KB IRAM for suspend usage */
96 sys_iram = __arm_ioremap_exec(ZX_IRAM_BASE, PAGE_SIZE, false); 96 sys_iram = __arm_ioremap_exec(ZX_IRAM_BASE, PAGE_SIZE, false);
97 zx_secondary_startup_pa = virt_to_phys(zx_secondary_startup); 97 zx_secondary_startup_pa = __pa_symbol(zx_secondary_startup);
98 fncpy(sys_iram, &zx_resume_jump, zx_suspend_iram_sz); 98 fncpy(sys_iram, &zx_resume_jump, zx_suspend_iram_sz);
99} 99}
100 100
diff --git a/arch/arm/mach-zynq/platsmp.c b/arch/arm/mach-zynq/platsmp.c
index 7cd9865bdeb7..caa6d5fe9078 100644
--- a/arch/arm/mach-zynq/platsmp.c
+++ b/arch/arm/mach-zynq/platsmp.c
@@ -89,7 +89,7 @@ EXPORT_SYMBOL(zynq_cpun_start);
89 89
90static int zynq_boot_secondary(unsigned int cpu, struct task_struct *idle) 90static int zynq_boot_secondary(unsigned int cpu, struct task_struct *idle)
91{ 91{
92 return zynq_cpun_start(virt_to_phys(secondary_startup), cpu); 92 return zynq_cpun_start(__pa_symbol(secondary_startup), cpu);
93} 93}
94 94
95/* 95/*