diff options
author | Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> | 2019-12-27 21:03:43 +0300 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2019-12-28 13:05:08 -0800 |
commit | 7ecc6c1d5c8dbc713c647512a5267ca0eafe3e1c (patch) | |
tree | cff570e791b12d3eca18ec2adadaa1c93d987ea1 /arch/arc/kernel | |
parent | 833a20b8d4924b63ef7700e43fe4941963002822 (diff) | |
download | linux-stable-7ecc6c1d5c8dbc713c647512a5267ca0eafe3e1c.tar.gz linux-stable-7ecc6c1d5c8dbc713c647512a5267ca0eafe3e1c.tar.bz2 linux-stable-7ecc6c1d5c8dbc713c647512a5267ca0eafe3e1c.zip |
ARC: pt_regs: remove hardcoded registers offset
Replace hardcoded registers offset numbers by calculated via
offsetof.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel')
-rw-r--r-- | arch/arc/kernel/asm-offsets.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arc/kernel/asm-offsets.c b/arch/arc/kernel/asm-offsets.c index 631ebb5d3458..c783bcd35eb8 100644 --- a/arch/arc/kernel/asm-offsets.c +++ b/arch/arc/kernel/asm-offsets.c @@ -67,5 +67,14 @@ int main(void) DEFINE(SZ_CALLEE_REGS, sizeof(struct callee_regs)); DEFINE(SZ_PT_REGS, sizeof(struct pt_regs)); +#ifdef CONFIG_ISA_ARCV2 + OFFSET(PT_r12, pt_regs, r12); + OFFSET(PT_r30, pt_regs, r30); +#endif +#ifdef CONFIG_ARC_HAS_ACCL_REGS + OFFSET(PT_r58, pt_regs, r58); + OFFSET(PT_r59, pt_regs, r59); +#endif + return 0; } |