summaryrefslogtreecommitdiffstats
path: root/arch/arc/Makefile
diff options
context:
space:
mode:
authorVineet Gupta2013-02-11 15:22:57 +0100
committerVineet Gupta2013-02-15 18:45:58 +0100
commit080c37473eb671a037b3e9a315303851f0675be5 (patch)
treeb407d85217f9c979eed57f2adb31bc3fb06a9c09 /arch/arc/Makefile
parentARC: [plat-arcfpga] defconfig (diff)
downloadkernel-qcow2-linux-080c37473eb671a037b3e9a315303851f0675be5.tar.gz
kernel-qcow2-linux-080c37473eb671a037b3e9a315303851f0675be5.tar.xz
kernel-qcow2-linux-080c37473eb671a037b3e9a315303851f0675be5.zip
ARC: [optim] Cache "current" in Register r25
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/Makefile')
-rw-r--r--arch/arc/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index 29b5fcd9c4b6..5c98fc19d99d 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -20,6 +20,15 @@ export PLATFORM
cflags-y += -Iarch/arc/plat-$(PLATFORM)/include
cflags-y += -mA7 -fno-common -pipe -fno-builtin -D__linux__
+ifdef CONFIG_ARC_CURR_IN_REG
+# For a global register defintion, make sure it gets passed to every file
+# We had a customer reported bug where some code built in kernel was NOT using
+# any kernel headers, and missing the r25 global register
+# Can't do unconditionally (like above) because of recursive include issues
+# due to <linux/thread_info.h>
+LINUXINCLUDE += -include ${src}/arch/arc/include/asm/current.h
+endif
+
atleast_gcc44 := $(call cc-ifversion, -gt, 0402, y)
cflags-$(atleast_gcc44) += -fsection-anchors