diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2011-11-08 08:07:36 -0500 |
---|---|---|
committer | David Brown <davidb@codeaurora.org> | 2011-11-08 11:58:28 -0500 |
commit | eca55f4d9c1d918c2aa95fb8a73a34e2ba8a1b11 (patch) | |
tree | 72f0aa283270bd13d34a928a75d37a1bcb618f47 | |
parent | 47a6770ac6cd0d28f14dd9e1b17705abe6f05e41 (diff) |
ARM: msm: fix compilation flags for MSM_SCM
CONFIG_MSM_SCM uses the smc instruction, which with some
toolchains requires a ".arch_extension" directive.
Cc: David Brown <davidb@codeaurora.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: David Brown <davidb@codeaurora.org>
-rw-r--r-- | arch/arm/mach-msm/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-msm/scm.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile index 4285dfd80b6f..4ad3969b9881 100644 --- a/arch/arm/mach-msm/Makefile +++ b/arch/arm/mach-msm/Makefile | |||
@@ -15,6 +15,8 @@ obj-$(CONFIG_MSM_SMD) += smd.o smd_debug.o | |||
15 | obj-$(CONFIG_MSM_SMD) += last_radio_log.o | 15 | obj-$(CONFIG_MSM_SMD) += last_radio_log.o |
16 | obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.o | 16 | obj-$(CONFIG_MSM_SCM) += scm.o scm-boot.o |
17 | 17 | ||
18 | CFLAGS_scm.o :=$(call as-instr,.arch_extension sec,-DREQUIRES_SEC=1) | ||
19 | |||
18 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 20 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
19 | obj-$(CONFIG_SMP) += headsmp.o platsmp.o | 21 | obj-$(CONFIG_SMP) += headsmp.o platsmp.o |
20 | 22 | ||
diff --git a/arch/arm/mach-msm/scm.c b/arch/arm/mach-msm/scm.c index 232f97a04504..bafabb502580 100644 --- a/arch/arm/mach-msm/scm.c +++ b/arch/arm/mach-msm/scm.c | |||
@@ -180,6 +180,9 @@ static u32 smc(u32 cmd_addr) | |||
180 | __asmeq("%1", "r0") | 180 | __asmeq("%1", "r0") |
181 | __asmeq("%2", "r1") | 181 | __asmeq("%2", "r1") |
182 | __asmeq("%3", "r2") | 182 | __asmeq("%3", "r2") |
183 | #ifdef REQUIRES_SEC | ||
184 | ".arch_extension sec\n" | ||
185 | #endif | ||
183 | "smc #0 @ switch to secure world\n" | 186 | "smc #0 @ switch to secure world\n" |
184 | : "=r" (r0) | 187 | : "=r" (r0) |
185 | : "r" (r0), "r" (r1), "r" (r2) | 188 | : "r" (r0), "r" (r1), "r" (r2) |