diff options
author | Xiongwei Song <sxwjean@gmail.com> | 2021-08-07 09:02:38 +0800 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-08-26 21:21:07 +1000 |
commit | 4872cbd0ca35ca5b20d52e2539e7e1950f126e7b (patch) | |
tree | 29c33ca9887a0c182c0c0a5c1e1e2f6c03375884 /arch/powerpc/include | |
parent | cfa47772ca8d53d7a6c9b331a7f6e7c4c9827214 (diff) | |
download | linux-4872cbd0ca35ca5b20d52e2539e7e1950f126e7b.tar.gz |
powerpc: Add dear as a synonym for pt_regs.dar register
Create an anonymous union for dar and dear regsiters, we can reference
dear to get the effective address when CONFIG_4xx=y or CONFIG_BOOKE=y.
Otherwise, reference dar. 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-4-sxwjean@me.com
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/ptrace.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h index ab58939653db..5114ddba6f16 100644 --- a/arch/powerpc/include/asm/ptrace.h +++ b/arch/powerpc/include/asm/ptrace.h @@ -43,7 +43,10 @@ struct pt_regs unsigned long mq; #endif unsigned long trap; - unsigned long dar; + union { + unsigned long dar; + unsigned long dear; + }; union { unsigned long dsisr; unsigned long esr; |