diff --git a/arch/riscv/kernel/perf_callchain.c b/arch/riscv/kernel/perf_callchain.c index 3c0a43cb1..fb02811df 100755 --- a/arch/riscv/kernel/perf_callchain.c +++ b/arch/riscv/kernel/perf_callchain.c @@ -71,7 +71,7 @@ void perf_callchain_user(struct perf_callchain_entry_ctx *entry, perf_callchain_store(entry, regs->epc); fp = user_backtrace(entry, fp, regs->ra); - while (fp && !(fp & 0x7) && entry->nr < entry->max_stack) + while (fp && !(fp & 0x3) && entry->nr < entry->max_stack) fp = user_backtrace(entry, fp, 0); }