aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/Kconfig1
-rw-r--r--arch/sh/Makefile3
-rw-r--r--arch/sh/kernel/ftrace.c3
-rw-r--r--arch/sh/lib/mcount.S24
4 files changed, 7 insertions, 24 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 834b67c4db5a..aa2df3eaeb29 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -57,7 +57,6 @@ config SUPERH32
57 select HAVE_FUNCTION_TRACER 57 select HAVE_FUNCTION_TRACER
58 select HAVE_FTRACE_MCOUNT_RECORD 58 select HAVE_FTRACE_MCOUNT_RECORD
59 select HAVE_DYNAMIC_FTRACE 59 select HAVE_DYNAMIC_FTRACE
60 select HAVE_FUNCTION_TRACE_MCOUNT_TEST
61 select HAVE_FTRACE_NMI_ENTER if DYNAMIC_FTRACE 60 select HAVE_FTRACE_NMI_ENTER if DYNAMIC_FTRACE
62 select ARCH_WANT_IPC_PARSE_VERSION 61 select ARCH_WANT_IPC_PARSE_VERSION
63 select HAVE_FUNCTION_GRAPH_TRACER 62 select HAVE_FUNCTION_GRAPH_TRACER
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index d4d16e4be07c..bf5b3f5f4962 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -32,7 +32,8 @@ endif
32 32
33cflags-$(CONFIG_CPU_SH2) := $(call cc-option,-m2,) 33cflags-$(CONFIG_CPU_SH2) := $(call cc-option,-m2,)
34cflags-$(CONFIG_CPU_SH2A) += $(call cc-option,-m2a,) \ 34cflags-$(CONFIG_CPU_SH2A) += $(call cc-option,-m2a,) \
35 $(call cc-option,-m2a-nofpu,) 35 $(call cc-option,-m2a-nofpu,) \
36 $(call cc-option,-m4-nofpu,)
36cflags-$(CONFIG_CPU_SH3) := $(call cc-option,-m3,) 37cflags-$(CONFIG_CPU_SH3) := $(call cc-option,-m3,)
37cflags-$(CONFIG_CPU_SH4) := $(call cc-option,-m4,) \ 38cflags-$(CONFIG_CPU_SH4) := $(call cc-option,-m4,) \
38 $(call cc-option,-mno-implicit-fp,-m4-nofpu) 39 $(call cc-option,-mno-implicit-fp,-m4-nofpu)
diff --git a/arch/sh/kernel/ftrace.c b/arch/sh/kernel/ftrace.c
index 3c74f53db6db..079d70e6d74b 100644
--- a/arch/sh/kernel/ftrace.c
+++ b/arch/sh/kernel/ftrace.c
@@ -344,6 +344,9 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
344 struct ftrace_graph_ent trace; 344 struct ftrace_graph_ent trace;
345 unsigned long return_hooker = (unsigned long)&return_to_handler; 345 unsigned long return_hooker = (unsigned long)&return_to_handler;
346 346
347 if (unlikely(ftrace_graph_is_dead()))
348 return;
349
347 if (unlikely(atomic_read(&current->tracing_graph_pause))) 350 if (unlikely(atomic_read(&current->tracing_graph_pause)))
348 return; 351 return;
349 352
diff --git a/arch/sh/lib/mcount.S b/arch/sh/lib/mcount.S
index 52aa2011d753..7a8572f9d58b 100644
--- a/arch/sh/lib/mcount.S
+++ b/arch/sh/lib/mcount.S
@@ -92,13 +92,6 @@ mcount:
92 rts 92 rts
93 nop 93 nop
94#else 94#else
95#ifndef CONFIG_DYNAMIC_FTRACE
96 mov.l .Lfunction_trace_stop, r0
97 mov.l @r0, r0
98 tst r0, r0
99 bf ftrace_stub
100#endif
101
102 MCOUNT_ENTER() 95 MCOUNT_ENTER()
103 96
104#ifdef CONFIG_DYNAMIC_FTRACE 97#ifdef CONFIG_DYNAMIC_FTRACE
@@ -174,11 +167,6 @@ ftrace_graph_call:
174 167
175 .globl ftrace_caller 168 .globl ftrace_caller
176ftrace_caller: 169ftrace_caller:
177 mov.l .Lfunction_trace_stop, r0
178 mov.l @r0, r0
179 tst r0, r0
180 bf ftrace_stub
181
182 MCOUNT_ENTER() 170 MCOUNT_ENTER()
183 171
184 .globl ftrace_call 172 .globl ftrace_call
@@ -196,8 +184,6 @@ ftrace_call:
196#endif /* CONFIG_DYNAMIC_FTRACE */ 184#endif /* CONFIG_DYNAMIC_FTRACE */
197 185
198 .align 2 186 .align 2
199.Lfunction_trace_stop:
200 .long function_trace_stop
201 187
202/* 188/*
203 * NOTE: From here on the locations of the .Lftrace_stub label and 189 * NOTE: From here on the locations of the .Lftrace_stub label and
@@ -217,12 +203,7 @@ ftrace_stub:
217#ifdef CONFIG_FUNCTION_GRAPH_TRACER 203#ifdef CONFIG_FUNCTION_GRAPH_TRACER
218 .globl ftrace_graph_caller 204 .globl ftrace_graph_caller
219ftrace_graph_caller: 205ftrace_graph_caller:
220 mov.l 2f, r0 206 mov.l 2f, r1
221 mov.l @r0, r0
222 tst r0, r0
223 bt 1f
224
225 mov.l 3f, r1
226 jmp @r1 207 jmp @r1
227 nop 208 nop
2281: 2091:
@@ -242,8 +223,7 @@ ftrace_graph_caller:
242 MCOUNT_LEAVE() 223 MCOUNT_LEAVE()
243 224
244 .align 2 225 .align 2
2452: .long function_trace_stop 2262: .long skip_trace
2463: .long skip_trace
247.Lprepare_ftrace_return: 227.Lprepare_ftrace_return:
248 .long prepare_ftrace_return 228 .long prepare_ftrace_return
249 229