summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-keystone/platsmp.c
diff options
context:
space:
mode:
authorSantosh Shilimkar <santosh.shilimkar@ti.com>2013-06-22 00:54:47 +0200
committerArnd Bergmann <arnd@arndb.de>2013-06-24 16:23:36 +0200
commit3aae7ab0f15d69166789cf84aea39e6b438c4c26 (patch)
tree79326b144c155370799c3bbffb2f60c9b33f374c /arch/arm/mach-keystone/platsmp.c
parentARM: multiplatform: always pick one CPU type (diff)
downloadlinux-3aae7ab0f15d69166789cf84aea39e6b438c4c26.tar.xz
linux-3aae7ab0f15d69166789cf84aea39e6b438c4c26.zip
ARM: keystone: Move CPU bringup code to dedicated asm file
Because of inline asm usage in platsmp.c, smc instruction creates build failure for ARM V6+V7 build where as using instruction encoding for smc breaks the thumb2 build. So move the code snippet to separate asm file and mark it with 'armv7-a$(plus_sec)' to avoid any build issues. Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-keystone/platsmp.c')
-rw-r--r--arch/arm/mach-keystone/platsmp.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/arch/arm/mach-keystone/platsmp.c b/arch/arm/mach-keystone/platsmp.c
index 630ab3bd5f78..1d4181e1daf2 100644
--- a/arch/arm/mach-keystone/platsmp.c
+++ b/arch/arm/mach-keystone/platsmp.c
@@ -30,18 +30,9 @@ static int __cpuinit keystone_smp_boot_secondary(unsigned int cpu,
pr_debug("keystone-smp: booting cpu %d, vector %08lx\n",
cpu, start);
- asm volatile (
- "mov r0, #0\n" /* power on cmd */
- "mov r1, %1\n" /* cpu */
- "mov r2, %2\n" /* start */
- ".inst 0xe1600070\n" /* smc #0 */
- "mov %0, r0\n"
- : "=r" (error)
- : "r"(cpu), "r"(start)
- : "cc", "r0", "r1", "r2", "memory"
- );
-
- pr_debug("keystone-smp: monitor returned %d\n", error);
+ error = keystone_cpu_smc(KEYSTONE_MON_CPU_UP_IDX, cpu, start);
+ if (error)
+ pr_err("CPU %d bringup failed with %d\n", cpu, error);
return error;
}