diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2016-10-17 07:07:46 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-10-17 08:44:33 -0400 |
commit | dcddba96cdbc5d0e4d4a17bf22cfd9b2f038a4ca (patch) | |
tree | 409b7d1c784ecb598a9da816f60aee9e7761cab5 | |
parent | 4d062487f3431f124e3a2420c0da0b7a2388dc80 (diff) |
s390/dumpstack: get rid of return_address again
With commit ef6000b4c670 ("Disable the __builtin_return_address()
warning globally after all)" the kernel does not warn at all again if
__builtin_return_address(n) is called with n > 0.
Besides the fact that this was a false warning on s390 anyway, due to
the always present backchain, we can now revert commit 5606330627ab
("s390/dumpstack: implement and use return_address()") again, to
simplify the code again.
After all I shouldn't have had return_address() implememted at all to
workaround this issue. So get rid of this again.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | arch/s390/include/asm/ftrace.h | 4 | ||||
-rw-r--r-- | arch/s390/kernel/dumpstack.c | 24 |
2 files changed, 1 insertions, 27 deletions
diff --git a/arch/s390/include/asm/ftrace.h b/arch/s390/include/asm/ftrace.h index 64053d9ac3f2..836c56290499 100644 --- a/arch/s390/include/asm/ftrace.h +++ b/arch/s390/include/asm/ftrace.h | |||
@@ -12,9 +12,7 @@ | |||
12 | 12 | ||
13 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
14 | 14 | ||
15 | unsigned long return_address(int depth); | 15 | #define ftrace_return_address(n) __builtin_return_address(n) |
16 | |||
17 | #define ftrace_return_address(n) return_address(n) | ||
18 | 16 | ||
19 | void _mcount(void); | 17 | void _mcount(void); |
20 | void ftrace_caller(void); | 18 | void ftrace_caller(void); |
diff --git a/arch/s390/kernel/dumpstack.c b/arch/s390/kernel/dumpstack.c index 4bebe72b7780..34345c0a3c46 100644 --- a/arch/s390/kernel/dumpstack.c +++ b/arch/s390/kernel/dumpstack.c | |||
@@ -87,30 +87,6 @@ void dump_trace(dump_trace_func_t func, void *data, struct task_struct *task, | |||
87 | } | 87 | } |
88 | EXPORT_SYMBOL_GPL(dump_trace); | 88 | EXPORT_SYMBOL_GPL(dump_trace); |
89 | 89 | ||
90 | struct return_address_data { | ||
91 | unsigned long address; | ||
92 | int depth; | ||
93 | }; | ||
94 | |||
95 | static int __return_address(void *data, unsigned long address, int reliable) | ||
96 | { | ||
97 | struct return_address_data *rd = data; | ||
98 | |||
99 | if (rd->depth--) | ||
100 | return 0; | ||
101 | rd->address = address; | ||
102 | return 1; | ||
103 | } | ||
104 | |||
105 | unsigned long return_address(int depth) | ||
106 | { | ||
107 | struct return_address_data rd = { .depth = depth + 2 }; | ||
108 | |||
109 | dump_trace(__return_address, &rd, NULL, current_stack_pointer()); | ||
110 | return rd.address; | ||
111 | } | ||
112 | EXPORT_SYMBOL_GPL(return_address); | ||
113 | |||
114 | static int show_address(void *data, unsigned long address, int reliable) | 90 | static int show_address(void *data, unsigned long address, int reliable) |
115 | { | 91 | { |
116 | if (reliable) | 92 | if (reliable) |