// SPDX-License-Identifier: GPL-2.0 #include <linux/errno.h> #include <linux/kernel.h> #include <linux/perf_event.h> #include <linux/bug.h> #include <linux/sched/task_stack.h> #include <asm/compat.h> #include <asm/perf_regs.h> #include <asm/ptrace.h>
u64 perf_reg_value(struct pt_regs *regs, int idx) { if (WARN_ON_ONCE((u32)idx >= PERF_REG_ARM64_MAX)) return 0; /* * Compat (i.e. 32 bit) mode: * - PC has been set in the pt_regs struct in kernel_entry, * - Handle SP and LR here. */ if (compat_user_mode(regs)) { if ((u32)idx == PERF_REG_ARM64_SP) return regs->compat_sp; if ((u32)idx == PERF_REG_ARM64_LR) 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]; }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Jean Pihet | 74 | 72.55% | 1 | 50.00% |
Will Deacon | 28 | 27.45% | 1 | 50.00% |
Total | 102 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Jean Pihet | 24 | 100.00% | 1 | 100.00% |
Total | 24 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Jean Pihet | 27 | 100.00% | 1 | 100.00% |
Total | 27 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Andrew Lutomirski | 38 | 100.00% | 1 | 100.00% |
Total | 38 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Jean Pihet | 147 | 66.82% | 1 | 16.67% |
Andrew Lutomirski | 38 | 17.27% | 1 | 16.67% |
Will Deacon | 28 | 12.73% | 1 | 16.67% |
Ingo Molnar | 3 | 1.36% | 1 | 16.67% |
Mark Salter | 3 | 1.36% | 1 | 16.67% |
Greg Kroah-Hartman | 1 | 0.45% | 1 | 16.67% |
Total | 220 | 100.00% | 6 | 100.00% |