diff mbox

[RFC,1/5] arm: tegra: Fix build under Android cross-compiler

Message ID 1358366173-56861-2-git-send-email-jeremya@cs.columbia.edu
State Not Applicable, archived
Headers show

Commit Message

Jeremy C. Andrus Jan. 16, 2013, 7:56 p.m. UTC
From: "Jeremy C. Andrus" <jeremya@cs.columbia.edu>

This patch explicitly enables ARM security extensions in sleep.S.
This fixes kernel builds with Android provided ARM cross-compilers
which do not assume the presence of the security extensions.

Signed-off-by: Jeremy C. Andrus <jeremya@cs.columbia.edu>

Change-Id: Id079d54ad0cecf9145b9d51aaeebf4e6a22e80a2
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Olof Johansson <olof@lixom.net>
---
 arch/arm/mach-tegra/sleep.S | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox

Patch

diff --git a/arch/arm/mach-tegra/sleep.S b/arch/arm/mach-tegra/sleep.S
index 18b8799..4e898b8 100644
--- a/arch/arm/mach-tegra/sleep.S
+++ b/arch/arm/mach-tegra/sleep.S
@@ -50,6 +50,15 @@ 
 #define TEGRA_CLK_RESET_VIRT	(TEGRA_CLK_RESET_BASE - IO_PPSB_PHYS + IO_PPSB_VIRT)
 
 /*
+ * ARM security extensions are required when compiling TRUSTED_FOUNDATIONS code,
+ * and this explicit arch_extension line fixes the build on compilers where the
+ * as-instr Makefile function fails. The Android cross-compiler is an example.
+ */
+#ifdef CONFIG_TRUSTED_FOUNDATIONS
+.arch_extension sec
+#endif
+
+/*
  * tegra_pen_lock
  *
  * spinlock implementation with no atomic test-and-set and no coherence