csky: Fixup abiv2 syscall_trace break a4 & a5
[ Upstream commit e0bbb53843
]
Current implementation could destory a4 & a5 when strace, so we need to get them
from pt_regs by SAVE_ALL.
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
5.4-rM2-2.2.x-imx-squashed
parent
16d902821b
commit
108681048c
|
@ -13,6 +13,8 @@
|
||||||
#define LSAVE_A1 28
|
#define LSAVE_A1 28
|
||||||
#define LSAVE_A2 32
|
#define LSAVE_A2 32
|
||||||
#define LSAVE_A3 36
|
#define LSAVE_A3 36
|
||||||
|
#define LSAVE_A4 40
|
||||||
|
#define LSAVE_A5 44
|
||||||
|
|
||||||
#define KSPTOUSP
|
#define KSPTOUSP
|
||||||
#define USPTOKSP
|
#define USPTOKSP
|
||||||
|
|
|
@ -170,8 +170,10 @@ csky_syscall_trace:
|
||||||
ldw a3, (sp, LSAVE_A3)
|
ldw a3, (sp, LSAVE_A3)
|
||||||
#if defined(__CSKYABIV2__)
|
#if defined(__CSKYABIV2__)
|
||||||
subi sp, 8
|
subi sp, 8
|
||||||
stw r5, (sp, 0x4)
|
ldw r9, (sp, LSAVE_A4)
|
||||||
stw r4, (sp, 0x0)
|
stw r9, (sp, 0x0)
|
||||||
|
ldw r9, (sp, LSAVE_A5)
|
||||||
|
stw r9, (sp, 0x4)
|
||||||
#else
|
#else
|
||||||
ldw r6, (sp, LSAVE_A4)
|
ldw r6, (sp, LSAVE_A4)
|
||||||
ldw r7, (sp, LSAVE_A5)
|
ldw r7, (sp, LSAVE_A5)
|
||||||
|
|
Loading…
Reference in New Issue