summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/perf_regs.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/kernel/perf_regs.c')
-rw-r--r--arch/arm64/kernel/perf_regs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm64/kernel/perf_regs.c b/arch/arm64/kernel/perf_regs.c
index 422ebd63b619..6762ad705587 100644
--- a/arch/arm64/kernel/perf_regs.c
+++ b/arch/arm64/kernel/perf_regs.c
@@ -24,6 +24,12 @@ u64 perf_reg_value(struct pt_regs *regs, int idx)
return regs->compat_lr;
}
+ if ((u32)idx == PERF_REG_ARM64_SP)
+ return regs->sp;
+
+ if ((u32)idx == PERF_REG_ARM64_PC)
+ return regs->pc;
+
return regs->regs[idx];
}