diff options
Diffstat (limited to 'arch/parisc/kernel/syscall.S')
-rw-r--r-- | arch/parisc/kernel/syscall.S | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index 59fc1a43ec3..f5f96021caa 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S | |||
@@ -288,18 +288,23 @@ tracesys: | |||
288 | STREG %r18,PT_GR18(%r2) | 288 | STREG %r18,PT_GR18(%r2) |
289 | /* Finished saving things for the debugger */ | 289 | /* Finished saving things for the debugger */ |
290 | 290 | ||
291 | ldil L%syscall_trace,%r1 | 291 | copy %r2,%r26 |
292 | ldil L%do_syscall_trace_enter,%r1 | ||
292 | ldil L%tracesys_next,%r2 | 293 | ldil L%tracesys_next,%r2 |
293 | be R%syscall_trace(%sr7,%r1) | 294 | be R%do_syscall_trace_enter(%sr7,%r1) |
294 | ldo R%tracesys_next(%r2),%r2 | 295 | ldo R%tracesys_next(%r2),%r2 |
295 | 296 | ||
296 | tracesys_next: | 297 | tracesys_next: |
298 | /* do_syscall_trace_enter either returned the syscallno, or -1L, | ||
299 | * so we skip restoring the PT_GR20 below, since we pulled it from | ||
300 | * task->thread.regs.gr[20] above. | ||
301 | */ | ||
302 | copy %ret0,%r20 | ||
297 | ldil L%sys_call_table,%r1 | 303 | ldil L%sys_call_table,%r1 |
298 | ldo R%sys_call_table(%r1), %r19 | 304 | ldo R%sys_call_table(%r1), %r19 |
299 | 305 | ||
300 | ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */ | 306 | ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */ |
301 | LDREG TI_TASK(%r1), %r1 | 307 | LDREG TI_TASK(%r1), %r1 |
302 | LDREG TASK_PT_GR20(%r1), %r20 | ||
303 | LDREG TASK_PT_GR26(%r1), %r26 /* Restore the users args */ | 308 | LDREG TASK_PT_GR26(%r1), %r26 /* Restore the users args */ |
304 | LDREG TASK_PT_GR25(%r1), %r25 | 309 | LDREG TASK_PT_GR25(%r1), %r25 |
305 | LDREG TASK_PT_GR24(%r1), %r24 | 310 | LDREG TASK_PT_GR24(%r1), %r24 |
@@ -336,7 +341,8 @@ tracesys_exit: | |||
336 | #ifdef CONFIG_64BIT | 341 | #ifdef CONFIG_64BIT |
337 | ldo -16(%r30),%r29 /* Reference param save area */ | 342 | ldo -16(%r30),%r29 /* Reference param save area */ |
338 | #endif | 343 | #endif |
339 | bl syscall_trace, %r2 | 344 | ldo TASK_REGS(%r1),%r26 |
345 | bl do_syscall_trace_exit,%r2 | ||
340 | STREG %r28,TASK_PT_GR28(%r1) /* save return value now */ | 346 | STREG %r28,TASK_PT_GR28(%r1) /* save return value now */ |
341 | ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */ | 347 | ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */ |
342 | LDREG TI_TASK(%r1), %r1 | 348 | LDREG TI_TASK(%r1), %r1 |
@@ -353,12 +359,12 @@ tracesys_exit: | |||
353 | 359 | ||
354 | tracesys_sigexit: | 360 | tracesys_sigexit: |
355 | ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */ | 361 | ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */ |
356 | LDREG 0(%r1), %r1 | 362 | LDREG TI_TASK(%r1), %r1 |
357 | #ifdef CONFIG_64BIT | 363 | #ifdef CONFIG_64BIT |
358 | ldo -16(%r30),%r29 /* Reference param save area */ | 364 | ldo -16(%r30),%r29 /* Reference param save area */ |
359 | #endif | 365 | #endif |
360 | bl syscall_trace, %r2 | 366 | bl do_syscall_trace_exit,%r2 |
361 | nop | 367 | ldo TASK_REGS(%r1),%r26 |
362 | 368 | ||
363 | ldil L%syscall_exit_rfi,%r1 | 369 | ldil L%syscall_exit_rfi,%r1 |
364 | be,n R%syscall_exit_rfi(%sr7,%r1) | 370 | be,n R%syscall_exit_rfi(%sr7,%r1) |