summaryrefslogtreecommitdiffstats
path: root/arch/s390/include
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2024-04-29 14:28:44 +0200
committerAlexander Gordeev <agordeev@linux.ibm.com>2024-05-14 13:37:06 +0200
commitebd912ff9919a10609511383d94942362234c077 (patch)
tree9a2855b26b7ec7cd60723dc3ac08fb511a58bf2d /arch/s390/include
parent185445c7c137822ad856aae91a41e199370cb534 (diff)
downloadlinux-stable-ebd912ff9919a10609511383d94942362234c077.tar.gz
linux-stable-ebd912ff9919a10609511383d94942362234c077.tar.bz2
linux-stable-ebd912ff9919a10609511383d94942362234c077.zip
s390/stacktrace: Merge perf_callchain_user() and arch_stack_walk_user()
The two functions perf_callchain_user() and arch_stack_walk_user() are nearly identical. Reduce code duplication and add a common helper which can be called by both functions. Fixes: aa44433ac4ee ("s390: add USER_STACKTRACE support") Reviewed-by: Jens Remus <jremus@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r--arch/s390/include/asm/stacktrace.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/s390/include/asm/stacktrace.h b/arch/s390/include/asm/stacktrace.h
index 433fde85b14e..4aefbe32265d 100644
--- a/arch/s390/include/asm/stacktrace.h
+++ b/arch/s390/include/asm/stacktrace.h
@@ -2,6 +2,7 @@
#ifndef _ASM_S390_STACKTRACE_H
#define _ASM_S390_STACKTRACE_H
+#include <linux/stacktrace.h>
#include <linux/uaccess.h>
#include <linux/ptrace.h>
@@ -12,6 +13,12 @@ struct stack_frame_user {
unsigned long empty2[4];
};
+struct perf_callchain_entry_ctx;
+
+void arch_stack_walk_user_common(stack_trace_consume_fn consume_entry, void *cookie,
+ struct perf_callchain_entry_ctx *entry,
+ const struct pt_regs *regs, bool perf);
+
enum stack_type {
STACK_TYPE_UNKNOWN,
STACK_TYPE_TASK,