aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2014-08-15 07:16:09 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-09-09 02:53:29 -0400
commit5d6a0163494c78ad7b6de733c8793e66b5da9212 (patch)
tree7e3e83ca5f2af8da1d564094931daa83b9f1bf60 /arch/s390
parent10dec7dbd50ab0be96dda085d625d54ce800e426 (diff)
s390/ftrace: enforce DYNAMIC_FTRACE if FUNCTION_TRACER is selected
We have too many combinations for function tracing. Lets simply stick to the most advanced option, so we don't have to care of other combinations. This means we always select DYNAMIC_FTRACE if FUNCTION_TRACER is selected. In the s390 Makefile also remove CONFIG_FTRACE_SYSCALLS since that functionality got moved to architecture independent code in the meantime. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/Kconfig1
-rw-r--r--arch/s390/kernel/Makefile4
-rw-r--r--arch/s390/kernel/ftrace.c6
-rw-r--r--arch/s390/kernel/mcount.S2
-rw-r--r--arch/s390/kernel/mcount64.S2
5 files changed, 2 insertions, 13 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 3f845fc02ac4..47492fc692f4 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -97,6 +97,7 @@ config S390
97 select ARCH_WANT_IPC_PARSE_VERSION 97 select ARCH_WANT_IPC_PARSE_VERSION
98 select BUILDTIME_EXTABLE_SORT 98 select BUILDTIME_EXTABLE_SORT
99 select CLONE_BACKWARDS2 99 select CLONE_BACKWARDS2
100 select DYNAMIC_FTRACE if FUNCTION_TRACER
100 select GENERIC_CLOCKEVENTS 101 select GENERIC_CLOCKEVENTS
101 select GENERIC_CPU_DEVICES if !SMP 102 select GENERIC_CPU_DEVICES if !SMP
102 select GENERIC_FIND_FIRST_BIT 103 select GENERIC_FIND_FIRST_BIT
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile
index a95c4ca99617..d44245d4df37 100644
--- a/arch/s390/kernel/Makefile
+++ b/arch/s390/kernel/Makefile
@@ -53,9 +53,7 @@ obj-$(CONFIG_COMPAT) += compat_wrapper.o $(compat-obj-y)
53obj-$(CONFIG_STACKTRACE) += stacktrace.o 53obj-$(CONFIG_STACKTRACE) += stacktrace.o
54obj-$(CONFIG_KPROBES) += kprobes.o 54obj-$(CONFIG_KPROBES) += kprobes.o
55obj-$(CONFIG_FUNCTION_TRACER) += $(if $(CONFIG_64BIT),mcount64.o,mcount.o) 55obj-$(CONFIG_FUNCTION_TRACER) += $(if $(CONFIG_64BIT),mcount64.o,mcount.o)
56obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o 56obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o
57obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
58obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o
59obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 57obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
60 58
61ifdef CONFIG_64BIT 59ifdef CONFIG_64BIT
diff --git a/arch/s390/kernel/ftrace.c b/arch/s390/kernel/ftrace.c
index 14b61954d5a8..f908e42e11c4 100644
--- a/arch/s390/kernel/ftrace.c
+++ b/arch/s390/kernel/ftrace.c
@@ -17,8 +17,6 @@
17#include <asm/asm-offsets.h> 17#include <asm/asm-offsets.h>
18#include "entry.h" 18#include "entry.h"
19 19
20#ifdef CONFIG_DYNAMIC_FTRACE
21
22void ftrace_disable_code(void); 20void ftrace_disable_code(void);
23void ftrace_enable_insn(void); 21void ftrace_enable_insn(void);
24 22
@@ -142,8 +140,6 @@ int __init ftrace_dyn_arch_init(void)
142 return 0; 140 return 0;
143} 141}
144 142
145#endif /* CONFIG_DYNAMIC_FTRACE */
146
147#ifdef CONFIG_FUNCTION_GRAPH_TRACER 143#ifdef CONFIG_FUNCTION_GRAPH_TRACER
148/* 144/*
149 * Hook the return address and push it in the stack of return addresses 145 * Hook the return address and push it in the stack of return addresses
@@ -169,7 +165,6 @@ out:
169 return parent; 165 return parent;
170} 166}
171 167
172#ifdef CONFIG_DYNAMIC_FTRACE
173/* 168/*
174 * Patch the kernel code at ftrace_graph_caller location. The instruction 169 * Patch the kernel code at ftrace_graph_caller location. The instruction
175 * there is branch relative and save to prepare_ftrace_return. To disable 170 * there is branch relative and save to prepare_ftrace_return. To disable
@@ -219,5 +214,4 @@ int ftrace_disable_ftrace_graph_caller(void)
219} 214}
220 215
221#endif /* CONFIG_64BIT */ 216#endif /* CONFIG_64BIT */
222#endif /* CONFIG_DYNAMIC_FTRACE */
223#endif /* CONFIG_FUNCTION_GRAPH_TRACER */ 217#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
diff --git a/arch/s390/kernel/mcount.S b/arch/s390/kernel/mcount.S
index 433c6dbfa442..be6dbd9a81a7 100644
--- a/arch/s390/kernel/mcount.S
+++ b/arch/s390/kernel/mcount.S
@@ -15,11 +15,9 @@ ENTRY(ftrace_stub)
15 br %r14 15 br %r14
16 16
17ENTRY(_mcount) 17ENTRY(_mcount)
18#ifdef CONFIG_DYNAMIC_FTRACE
19 br %r14 18 br %r14
20 19
21ENTRY(ftrace_caller) 20ENTRY(ftrace_caller)
22#endif
23 stm %r2,%r5,16(%r15) 21 stm %r2,%r5,16(%r15)
24 bras %r1,1f 22 bras %r1,1f
250: .long ftrace_trace_function 230: .long ftrace_trace_function
diff --git a/arch/s390/kernel/mcount64.S b/arch/s390/kernel/mcount64.S
index 4a65dabae851..8cf976f83a10 100644
--- a/arch/s390/kernel/mcount64.S
+++ b/arch/s390/kernel/mcount64.S
@@ -22,13 +22,11 @@ ENTRY(ftrace_stub)
22#define STACK_PTREGS_PSW (STACK_PTREGS + __PT_PSW) 22#define STACK_PTREGS_PSW (STACK_PTREGS + __PT_PSW)
23 23
24ENTRY(_mcount) 24ENTRY(_mcount)
25#ifdef CONFIG_DYNAMIC_FTRACE
26 br %r14 25 br %r14
27 26
28ENTRY(ftrace_caller) 27ENTRY(ftrace_caller)
29 .globl ftrace_regs_caller 28 .globl ftrace_regs_caller
30 .set ftrace_regs_caller,ftrace_caller 29 .set ftrace_regs_caller,ftrace_caller
31#endif
32 lgr %r1,%r15 30 lgr %r1,%r15
33 aghi %r15,-STACK_FRAME_SIZE 31 aghi %r15,-STACK_FRAME_SIZE
34 stg %r1,__SF_BACKCHAIN(%r15) 32 stg %r1,__SF_BACKCHAIN(%r15)