Commit 178ba00c authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Thomas Gleixner

sh/ftrace: Move arch_ftrace_nmi_{enter,exit} into nmi exception

SuperH is the last remaining user of arch_ftrace_nmi_{enter,exit}(),
remove it from the generic code and into the SuperH code.
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarAlexandre Chartre <alexandre.chartre@oracle.com>
Acked-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Link: https://lkml.kernel.org/r/20200505134101.248881738@linutronix.de
parent e616cb8d
...@@ -229,14 +229,6 @@ Adding support for it is easy: just define the macro in asm/ftrace.h and ...@@ -229,14 +229,6 @@ Adding support for it is easy: just define the macro in asm/ftrace.h and
pass the return address pointer as the 'retp' argument to pass the return address pointer as the 'retp' argument to
ftrace_push_return_trace(). ftrace_push_return_trace().
HAVE_FTRACE_NMI_ENTER
---------------------
If you can't trace NMI functions, then skip this option.
<details to be filled>
HAVE_SYSCALL_TRACEPOINTS HAVE_SYSCALL_TRACEPOINTS
------------------------ ------------------------
......
...@@ -71,7 +71,6 @@ config SUPERH32 ...@@ -71,7 +71,6 @@ config SUPERH32
select HAVE_FUNCTION_TRACER select HAVE_FUNCTION_TRACER
select HAVE_FTRACE_MCOUNT_RECORD select HAVE_FTRACE_MCOUNT_RECORD
select HAVE_DYNAMIC_FTRACE select HAVE_DYNAMIC_FTRACE
select HAVE_FTRACE_NMI_ENTER if DYNAMIC_FTRACE
select ARCH_WANT_IPC_PARSE_VERSION select ARCH_WANT_IPC_PARSE_VERSION
select HAVE_FUNCTION_GRAPH_TRACER select HAVE_FUNCTION_GRAPH_TRACER
select HAVE_ARCH_KGDB select HAVE_ARCH_KGDB
......
...@@ -170,11 +170,21 @@ BUILD_TRAP_HANDLER(bug) ...@@ -170,11 +170,21 @@ BUILD_TRAP_HANDLER(bug)
force_sig(SIGTRAP); force_sig(SIGTRAP);
} }
#ifdef CONFIG_DYNAMIC_FTRACE
extern void arch_ftrace_nmi_enter(void);
extern void arch_ftrace_nmi_exit(void);
#else
static inline void arch_ftrace_nmi_enter(void) { }
static inline void arch_ftrace_nmi_exit(void) { }
#endif
BUILD_TRAP_HANDLER(nmi) BUILD_TRAP_HANDLER(nmi)
{ {
unsigned int cpu = smp_processor_id(); unsigned int cpu = smp_processor_id();
TRAP_HANDLER_DECL; TRAP_HANDLER_DECL;
arch_ftrace_nmi_enter();
nmi_enter(); nmi_enter();
nmi_count(cpu)++; nmi_count(cpu)++;
...@@ -190,4 +200,6 @@ BUILD_TRAP_HANDLER(nmi) ...@@ -190,4 +200,6 @@ BUILD_TRAP_HANDLER(nmi)
} }
nmi_exit(); nmi_exit();
arch_ftrace_nmi_exit();
} }
...@@ -2,15 +2,6 @@ ...@@ -2,15 +2,6 @@
#ifndef _LINUX_FTRACE_IRQ_H #ifndef _LINUX_FTRACE_IRQ_H
#define _LINUX_FTRACE_IRQ_H #define _LINUX_FTRACE_IRQ_H
#ifdef CONFIG_FTRACE_NMI_ENTER
extern void arch_ftrace_nmi_enter(void);
extern void arch_ftrace_nmi_exit(void);
#else
static inline void arch_ftrace_nmi_enter(void) { }
static inline void arch_ftrace_nmi_exit(void) { }
#endif
#ifdef CONFIG_HWLAT_TRACER #ifdef CONFIG_HWLAT_TRACER
extern bool trace_hwlat_callback_enabled; extern bool trace_hwlat_callback_enabled;
extern void trace_hwlat_callback(bool enter); extern void trace_hwlat_callback(bool enter);
...@@ -22,12 +13,10 @@ static inline void ftrace_nmi_enter(void) ...@@ -22,12 +13,10 @@ static inline void ftrace_nmi_enter(void)
if (trace_hwlat_callback_enabled) if (trace_hwlat_callback_enabled)
trace_hwlat_callback(true); trace_hwlat_callback(true);
#endif #endif
arch_ftrace_nmi_enter();
} }
static inline void ftrace_nmi_exit(void) static inline void ftrace_nmi_exit(void)
{ {
arch_ftrace_nmi_exit();
#ifdef CONFIG_HWLAT_TRACER #ifdef CONFIG_HWLAT_TRACER
if (trace_hwlat_callback_enabled) if (trace_hwlat_callback_enabled)
trace_hwlat_callback(false); trace_hwlat_callback(false);
......
...@@ -10,11 +10,6 @@ config USER_STACKTRACE_SUPPORT ...@@ -10,11 +10,6 @@ config USER_STACKTRACE_SUPPORT
config NOP_TRACER config NOP_TRACER
bool bool
config HAVE_FTRACE_NMI_ENTER
bool
help
See Documentation/trace/ftrace-design.rst
config HAVE_FUNCTION_TRACER config HAVE_FUNCTION_TRACER
bool bool
help help
...@@ -72,11 +67,6 @@ config RING_BUFFER ...@@ -72,11 +67,6 @@ config RING_BUFFER
select TRACE_CLOCK select TRACE_CLOCK
select IRQ_WORK select IRQ_WORK
config FTRACE_NMI_ENTER
bool
depends on HAVE_FTRACE_NMI_ENTER
default y
config EVENT_TRACING config EVENT_TRACING
select CONTEXT_SWITCH_TRACER select CONTEXT_SWITCH_TRACER
select GLOB select GLOB
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment