aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-10-10 23:50:59 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-10-11 21:40:13 -0400
commitcb450766bcafc7bd7d40e9a5a0050745e8c68b3e (patch)
treed7a4f46dd68db4e9d20ad69b52b505c1c49fbfdd /arch/alpha
parentd9d0738a898dd26a417d00a6923eef1015d33735 (diff)
alpha: get rid of switch_stack argument of do_work_pending()
... and now the asm glue side of that. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/kernel/entry.S40
-rw-r--r--arch/alpha/kernel/signal.c3
2 files changed, 20 insertions, 23 deletions
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S
index 0c30ccea9294..16e074f9e581 100644
--- a/arch/alpha/kernel/entry.S
+++ b/arch/alpha/kernel/entry.S
@@ -311,7 +311,7 @@ entSys:
311 311
312 .align 4 312 .align 4
313ret_from_sys_call: 313ret_from_sys_call:
314 cmovne $26, 0, $19 /* $19 = 0 => non-restartable */ 314 cmovne $26, 0, $18 /* $18 = 0 => non-restartable */
315 ldq $0, SP_OFF($sp) 315 ldq $0, SP_OFF($sp)
316 and $0, 8, $0 316 and $0, 8, $0
317 beq $0, ret_to_kernel 317 beq $0, ret_to_kernel
@@ -320,8 +320,8 @@ ret_to_user:
320 sampling and the rti. */ 320 sampling and the rti. */
321 lda $16, 7 321 lda $16, 7
322 call_pal PAL_swpipl 322 call_pal PAL_swpipl
323 ldl $5, TI_FLAGS($8) 323 ldl $17, TI_FLAGS($8)
324 and $5, _TIF_WORK_MASK, $2 324 and $17, _TIF_WORK_MASK, $2
325 bne $2, work_pending 325 bne $2, work_pending
326restore_all: 326restore_all:
327 RESTORE_ALL 327 RESTORE_ALL
@@ -341,10 +341,10 @@ $syscall_error:
341 * frame to indicate that a negative return value wasn't an 341 * frame to indicate that a negative return value wasn't an
342 * error number.. 342 * error number..
343 */ 343 */
344 ldq $19, 0($sp) /* old syscall nr (zero if success) */ 344 ldq $18, 0($sp) /* old syscall nr (zero if success) */
345 beq $19, $ret_success 345 beq $18, $ret_success
346 346
347 ldq $20, 72($sp) /* .. and this a3 */ 347 ldq $19, 72($sp) /* .. and this a3 */
348 subq $31, $0, $0 /* with error in v0 */ 348 subq $31, $0, $0 /* with error in v0 */
349 addq $31, 1, $1 /* set a3 for errno return */ 349 addq $31, 1, $1 /* set a3 for errno return */
350 stq $0, 0($sp) 350 stq $0, 0($sp)
@@ -362,34 +362,32 @@ $ret_success:
362 * Do all cleanup when returning from all interrupts and system calls. 362 * Do all cleanup when returning from all interrupts and system calls.
363 * 363 *
364 * Arguments: 364 * Arguments:
365 * $5: TI_FLAGS.
366 * $8: current. 365 * $8: current.
367 * $19: The old syscall number, or zero if this is not a return 366 * $17: TI_FLAGS.
367 * $18: The old syscall number, or zero if this is not a return
368 * from a syscall that errored and is possibly restartable. 368 * from a syscall that errored and is possibly restartable.
369 * $20: The old a3 value 369 * $19: The old a3 value
370 */ 370 */
371 371
372 .align 4 372 .align 4
373 .ent work_pending 373 .ent work_pending
374work_pending: 374work_pending:
375 and $5, _TIF_NOTIFY_RESUME | _TIF_SIGPENDING, $2 375 and $17, _TIF_NOTIFY_RESUME | _TIF_SIGPENDING, $2
376 bne $2, $work_notifysig 376 bne $2, $work_notifysig
377 377
378$work_resched: 378$work_resched:
379 /* 379 /*
380 * We can get here only if we returned from syscall without SIGPENDING 380 * We can get here only if we returned from syscall without SIGPENDING
381 * or got through work_notifysig already. Either case means no syscall 381 * or got through work_notifysig already. Either case means no syscall
382 * restarts for us, so let $19 and $20 burn. 382 * restarts for us, so let $18 and $19 burn.
383 */ 383 */
384 jsr $26, schedule 384 jsr $26, schedule
385 mov 0, $19 385 mov 0, $18
386 br ret_to_user 386 br ret_to_user
387 387
388$work_notifysig: 388$work_notifysig:
389 mov $sp, $16 389 mov $sp, $16
390 bsr $1, do_switch_stack 390 bsr $1, do_switch_stack
391 mov $sp, $17
392 mov $5, $18
393 jsr $26, do_work_pending 391 jsr $26, do_work_pending
394 bsr $1, undo_switch_stack 392 bsr $1, undo_switch_stack
395 br restore_all 393 br restore_all
@@ -440,9 +438,9 @@ $strace_success:
440 438
441 .align 3 439 .align 3
442$strace_error: 440$strace_error:
443 ldq $19, 0($sp) /* old syscall nr (zero if success) */ 441 ldq $18, 0($sp) /* old syscall nr (zero if success) */
444 beq $19, $strace_success 442 beq $18, $strace_success
445 ldq $20, 72($sp) /* .. and this a3 */ 443 ldq $19, 72($sp) /* .. and this a3 */
446 444
447 subq $31, $0, $0 /* with error in v0 */ 445 subq $31, $0, $0 /* with error in v0 */
448 addq $31, 1, $1 /* set a3 for errno return */ 446 addq $31, 1, $1 /* set a3 for errno return */
@@ -450,11 +448,11 @@ $strace_error:
450 stq $1, 72($sp) /* a3 for return */ 448 stq $1, 72($sp) /* a3 for return */
451 449
452 bsr $1, do_switch_stack 450 bsr $1, do_switch_stack
453 mov $19, $9 /* save old syscall number */ 451 mov $18, $9 /* save old syscall number */
454 mov $20, $10 /* save old a3 */ 452 mov $19, $10 /* save old a3 */
455 jsr $26, syscall_trace_leave 453 jsr $26, syscall_trace_leave
456 mov $9, $19 454 mov $9, $18
457 mov $10, $20 455 mov $10, $19
458 bsr $1, undo_switch_stack 456 bsr $1, undo_switch_stack
459 457
460 mov $31, $26 /* tell "ret_from_sys_call" we can restart */ 458 mov $31, $26 /* tell "ret_from_sys_call" we can restart */
diff --git a/arch/alpha/kernel/signal.c b/arch/alpha/kernel/signal.c
index d0b3507ec6ba..32575f85507d 100644
--- a/arch/alpha/kernel/signal.c
+++ b/arch/alpha/kernel/signal.c
@@ -568,8 +568,7 @@ do_signal(struct pt_regs *regs, unsigned long r0, unsigned long r19)
568} 568}
569 569
570void 570void
571do_work_pending(struct pt_regs *regs, struct switch_stack *unused, 571do_work_pending(struct pt_regs *regs, unsigned long thread_flags,
572 unsigned long thread_flags,
573 unsigned long r0, unsigned long r19) 572 unsigned long r0, unsigned long r19)
574{ 573{
575 do { 574 do {