@@ -20,7 +20,7 @@
extern const unsigned long sys_call_table[];
int invoke_syscall(void *table, struct pt_regs *regs, int scno, void *retp);
-int invoke_syscall_trace(void *table, struct pt_regs *regs, int scno, void *retp);
+int invoke_syscall_trace(void *table, struct pt_regs *regs, void *retp);
static inline int syscall_get_nr(struct task_struct *task,
struct pt_regs *regs)
@@ -292,13 +292,9 @@ ENDPROC(vector_swi)
* context switches, and waiting for our parent to respond.
*/
__sys_trace:
- add r0, sp, #S_OFF
- bl syscall_trace_enter
- mov scno, r0
- mov r2, r0 @ scno into r2
add r1, sp, #S_R0 + S_OFF @ pointer to regs
mov r0, tbl
- badr r3, __sys_trace_return
+ badr r2, __sys_trace_return
bl invoke_syscall_trace
cmp r0, #-1
bne __sys_trace_return
@@ -19,8 +19,11 @@ __visible int invoke_syscall(void *table, struct pt_regs *regs, int scno, void *
int invoke_syscall_trace_asm(void *table, struct pt_regs *regs, int scno, void *retp);
-__visible int invoke_syscall_trace(void *table, struct pt_regs *regs, int scno, void *retp)
+__visible int invoke_syscall_trace(void *table, struct pt_regs *regs, void *retp)
{
+ int scno;
+
+ scno = syscall_trace_enter(regs);
if (scno == -1)
return -1;
This moves over the code entering into tracing into the C syscall invocation code. As syscall_trace_enter() will provide the current syscall number from the regs we need not provide the syscall number to the invocation function any more. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- arch/arm/include/asm/syscall.h | 2 +- arch/arm/kernel/entry-common.S | 6 +----- arch/arm/kernel/syscall.c | 5 ++++- 3 files changed, 6 insertions(+), 7 deletions(-)