summaryrefslogtreecommitdiffstats
path: root/arch/nds32/Makefile
diff options
context:
space:
mode:
authorZong Li2018-08-15 04:45:59 +0200
committerGreentime Hu2018-09-04 08:45:17 +0200
commita18082575c664847d36c6ca030b09ce8d93aec2f (patch)
tree96070f10fadd478d6f644d639b899d9bb9311650 /arch/nds32/Makefile
parentnds32: Extract the checking and getting pointer to a macro (diff)
downloadkernel-qcow2-linux-a18082575c664847d36c6ca030b09ce8d93aec2f.tar.gz
kernel-qcow2-linux-a18082575c664847d36c6ca030b09ce8d93aec2f.tar.xz
kernel-qcow2-linux-a18082575c664847d36c6ca030b09ce8d93aec2f.zip
nds32/ftrace: Support static function tracer
This patch support the static function tracer. On nds32 ABI, we need to always push return address to stack for __builtin_return_address can work correctly, otherwise, it will get the wrong value of $lp at leaf function. Signed-off-by: Zong Li <zong@andestech.com> Acked-by: Greentime Hu <greentime@andestech.com> Signed-off-by: Greentime Hu <greentime@andestech.com>
Diffstat (limited to 'arch/nds32/Makefile')
-rw-r--r--arch/nds32/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/nds32/Makefile b/arch/nds32/Makefile
index 63f4f173e5f4..3509fac10491 100644
--- a/arch/nds32/Makefile
+++ b/arch/nds32/Makefile
@@ -5,6 +5,10 @@ KBUILD_DEFCONFIG := defconfig
comma = ,
+ifdef CONFIG_FUNCTION_TRACER
+arch-y += -malways-save-lp -mno-relax
+endif
+
KBUILD_CFLAGS += $(call cc-option, -mno-sched-prolog-epilog)
KBUILD_CFLAGS += -mcmodel=large