summaryrefslogtreecommitdiff
path: root/arch/nds32/Makefile
diff options
context:
space:
mode:
authorZong Li <zong@andestech.com>2018-08-15 05:45:59 +0300
committerGreentime Hu <greentime@andestech.com>2018-09-04 09:45:17 +0300
commita18082575c664847d36c6ca030b09ce8d93aec2f (patch)
tree96070f10fadd478d6f644d639b899d9bb9311650 /arch/nds32/Makefile
parent487913ab18c215b06611c4c91c7e905fc0960eb8 (diff)
downloadlinux-a18082575c664847d36c6ca030b09ce8d93aec2f.tar.xz
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