summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/ptrace/ptrace.c
diff options
context:
space:
mode:
authorXiongwei Song <sxwjean@gmail.com>2021-08-07 03:02:36 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2021-08-26 13:21:06 +0200
commit4f8e78c0757e3c5a65d9d8ac76e2434c71a78f5a (patch)
tree2993bcc95e5bbccf0a2101a7c6acd861f505bfec /arch/powerpc/kernel/ptrace/ptrace.c
parentselftests: Skip TM tests on synthetic TM implementations (diff)
downloadlinux-4f8e78c0757e3c5a65d9d8ac76e2434c71a78f5a.tar.xz
linux-4f8e78c0757e3c5a65d9d8ac76e2434c71a78f5a.zip
powerpc: Add esr as a synonym for pt_regs.dsisr
Create an anonymous union for dsisr and esr regsiters, we can reference esr to get the exception detail when CONFIG_4xx=y or CONFIG_BOOKE=y. Otherwise, reference dsisr. This makes code more clear. Signed-off-by: Xiongwei Song <sxwjean@gmail.com> [mpe: Reword commit title] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20210807010239.416055-2-sxwjean@me.com
Diffstat (limited to 'arch/powerpc/kernel/ptrace/ptrace.c')
-rw-r--r--arch/powerpc/kernel/ptrace/ptrace.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/ptrace/ptrace.c b/arch/powerpc/kernel/ptrace/ptrace.c
index 0a0a33eb0d28..a222fd4d6334 100644
--- a/arch/powerpc/kernel/ptrace/ptrace.c
+++ b/arch/powerpc/kernel/ptrace/ptrace.c
@@ -375,6 +375,8 @@ void __init pt_regs_check(void)
offsetof(struct user_pt_regs, dar));
BUILD_BUG_ON(offsetof(struct pt_regs, dsisr) !=
offsetof(struct user_pt_regs, dsisr));
+ BUILD_BUG_ON(offsetof(struct pt_regs, esr) !=
+ offsetof(struct user_pt_regs, dsisr));
BUILD_BUG_ON(offsetof(struct pt_regs, result) !=
offsetof(struct user_pt_regs, result));