From: Varun R Mallya <varunrmallya@gmail.com>
To: pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
eddyz87@gmail.com, memxor@gmail.com, bjorn@kernel.org,
pulehui@huawei.com
Cc: alex@ghiti.fr, martin.lau@linux.dev, song@kernel.org,
yonghong.song@linux.dev, jolsa@kernel.org, emil@etsalapatis.com,
puranjay@kernel.org, linux-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org, bpf@vger.kernel.org,
linux-kselftest@vger.kernel.org, varunrmallya@gmail.com
Subject: [PATCH bpf-next v3 1/6] riscv: Use arch_stack_walk() for the kernel callchain
Date: Wed, 22 Jul 2026 19:30:08 +0530 [thread overview]
Message-ID: <20260722140015.1982158-2-varunrmallya@gmail.com> (raw)
In-Reply-To: <20260722140015.1982158-1-varunrmallya@gmail.com>
Replace walk_stackframe() with generic arch_stack_walk() which
already wraps walk_stackframe() and is the generic mechanism used in
archs like arm64 to build the kernel callchain.
Also decouples perf from the internal walk_stackframe unwinder which
is modified in later commits to accept a different function signature,
which warranted this change.
Signed-off-by: Varun R Mallya <varunrmallya@gmail.com>
---
arch/riscv/kernel/perf_callchain.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/kernel/perf_callchain.c b/arch/riscv/kernel/perf_callchain.c
index b465bc9eb870..93a12d53aa26 100644
--- a/arch/riscv/kernel/perf_callchain.c
+++ b/arch/riscv/kernel/perf_callchain.c
@@ -2,6 +2,7 @@
/* Copyright (C) 2019 Hangzhou C-SKY Microsystems co.,ltd. */
#include <linux/perf_event.h>
+#include <linux/stacktrace.h>
#include <linux/uaccess.h>
#include <asm/stacktrace.h>
@@ -44,5 +45,5 @@ void perf_callchain_kernel(struct perf_callchain_entry_ctx *entry,
return;
}
- walk_stackframe(NULL, regs, fill_callchain, entry);
+ arch_stack_walk(fill_callchain, entry, current, regs);
}
--
2.55.0
next prev parent reply other threads:[~2026-07-22 14:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 14:00 [PATCH bpf-next v3 0/6] Add BPF Exceptions support for RISC-V Varun R Mallya
2026-07-22 14:00 ` Varun R Mallya [this message]
2026-07-22 14:00 ` [PATCH bpf-next v3 2/6] riscv, stacktrace: Pass sp and fp to the walk_stackframe() callback Varun R Mallya
2026-07-22 14:00 ` [PATCH bpf-next v3 3/6] riscv, stacktrace: Implement arch_bpf_stack_walk() for BPF Varun R Mallya
2026-07-22 14:00 ` [PATCH bpf-next v3 4/6] riscv, bpf: Split prologue and epilogue into helper functions Varun R Mallya
2026-07-30 9:19 ` Pu Lehui
2026-07-22 14:00 ` [PATCH bpf-next v3 5/6] riscv, bpf: Add support for BPF exceptions Varun R Mallya
2026-07-22 15:28 ` bot+bpf-ci
2026-07-22 14:00 ` [PATCH bpf-next v3 6/6] riscv, bpf: Remove BPF exceptions from denylist Varun R Mallya
2026-07-30 9:29 ` Pu Lehui
2026-07-24 19:38 ` [PATCH bpf-next v3 0/6] Add BPF Exceptions support for RISC-V Björn Töpel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260722140015.1982158-2-varunrmallya@gmail.com \
--to=varunrmallya@gmail.com \
--cc=alex@ghiti.fr \
--cc=andrii@kernel.org \
--cc=aou@eecs.berkeley.edu \
--cc=ast@kernel.org \
--cc=bjorn@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=pulehui@huawei.com \
--cc=puranjay@kernel.org \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®