aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/kernel/entry.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha/kernel/entry.S')
-rw-r--r--arch/alpha/kernel/entry.S81
1 files changed, 29 insertions, 52 deletions
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S
index b45d913a51c3..6d159cee5f2f 100644
--- a/arch/alpha/kernel/entry.S
+++ b/arch/alpha/kernel/entry.S
@@ -73,8 +73,6 @@
73 ldq $20, HAE_REG($19); \ 73 ldq $20, HAE_REG($19); \
74 stq $21, HAE_CACHE($19); \ 74 stq $21, HAE_CACHE($19); \
75 stq $21, 0($20); \ 75 stq $21, 0($20); \
76 ldq $0, 0($sp); \
77 ldq $1, 8($sp); \
7899:; \ 7699:; \
79 ldq $19, 72($sp); \ 77 ldq $19, 72($sp); \
80 ldq $20, 80($sp); \ 78 ldq $20, 80($sp); \
@@ -316,19 +314,24 @@ ret_from_sys_call:
316 cmovne $26, 0, $19 /* $19 = 0 => non-restartable */ 314 cmovne $26, 0, $19 /* $19 = 0 => non-restartable */
317 ldq $0, SP_OFF($sp) 315 ldq $0, SP_OFF($sp)
318 and $0, 8, $0 316 and $0, 8, $0
319 beq $0, restore_all 317 beq $0, ret_to_kernel
320ret_from_reschedule: 318ret_to_user:
321 /* Make sure need_resched and sigpending don't change between 319 /* Make sure need_resched and sigpending don't change between
322 sampling and the rti. */ 320 sampling and the rti. */
323 lda $16, 7 321 lda $16, 7
324 call_pal PAL_swpipl 322 call_pal PAL_swpipl
325 ldl $5, TI_FLAGS($8) 323 ldl $5, TI_FLAGS($8)
326 and $5, _TIF_WORK_MASK, $2 324 and $5, _TIF_WORK_MASK, $2
327 bne $5, work_pending 325 bne $2, work_pending
328restore_all: 326restore_all:
329 RESTORE_ALL 327 RESTORE_ALL
330 call_pal PAL_rti 328 call_pal PAL_rti
331 329
330ret_to_kernel:
331 lda $16, 7
332 call_pal PAL_swpipl
333 br restore_all
334
332 .align 3 335 .align 3
333$syscall_error: 336$syscall_error:
334 /* 337 /*
@@ -363,7 +366,7 @@ $ret_success:
363 * $8: current. 366 * $8: current.
364 * $19: The old syscall number, or zero if this is not a return 367 * $19: The old syscall number, or zero if this is not a return
365 * from a syscall that errored and is possibly restartable. 368 * from a syscall that errored and is possibly restartable.
366 * $20: Error indication. 369 * $20: The old a3 value
367 */ 370 */
368 371
369 .align 4 372 .align 4
@@ -392,12 +395,18 @@ $work_resched:
392 395
393$work_notifysig: 396$work_notifysig:
394 mov $sp, $16 397 mov $sp, $16
395 br $1, do_switch_stack 398 bsr $1, do_switch_stack
396 mov $sp, $17 399 mov $sp, $17
397 mov $5, $18 400 mov $5, $18
401 mov $19, $9 /* save old syscall number */
402 mov $20, $10 /* save old a3 */
403 and $5, _TIF_SIGPENDING, $2
404 cmovne $2, 0, $9 /* we don't want double syscall restarts */
398 jsr $26, do_notify_resume 405 jsr $26, do_notify_resume
406 mov $9, $19
407 mov $10, $20
399 bsr $1, undo_switch_stack 408 bsr $1, undo_switch_stack
400 br restore_all 409 br ret_to_user
401.end work_pending 410.end work_pending
402 411
403/* 412/*
@@ -430,6 +439,7 @@ strace:
430 beq $1, 1f 439 beq $1, 1f
431 ldq $27, 0($2) 440 ldq $27, 0($2)
4321: jsr $26, ($27), sys_gettimeofday 4411: jsr $26, ($27), sys_gettimeofday
442ret_from_straced:
433 ldgp $gp, 0($26) 443 ldgp $gp, 0($26)
434 444
435 /* check return.. */ 445 /* check return.. */
@@ -650,7 +660,7 @@ kernel_thread:
650 /* We don't actually care for a3 success widgetry in the kernel. 660 /* We don't actually care for a3 success widgetry in the kernel.
651 Not for positive errno values. */ 661 Not for positive errno values. */
652 stq $0, 0($sp) /* $0 */ 662 stq $0, 0($sp) /* $0 */
653 br restore_all 663 br ret_to_kernel
654.end kernel_thread 664.end kernel_thread
655 665
656/* 666/*
@@ -757,11 +767,15 @@ sys_vfork:
757 .ent sys_sigreturn 767 .ent sys_sigreturn
758sys_sigreturn: 768sys_sigreturn:
759 .prologue 0 769 .prologue 0
770 lda $9, ret_from_straced
771 cmpult $26, $9, $9
760 mov $sp, $17 772 mov $sp, $17
761 lda $18, -SWITCH_STACK_SIZE($sp) 773 lda $18, -SWITCH_STACK_SIZE($sp)
762 lda $sp, -SWITCH_STACK_SIZE($sp) 774 lda $sp, -SWITCH_STACK_SIZE($sp)
763 jsr $26, do_sigreturn 775 jsr $26, do_sigreturn
764 br $1, undo_switch_stack 776 bne $9, 1f
777 jsr $26, syscall_trace
7781: br $1, undo_switch_stack
765 br ret_from_sys_call 779 br ret_from_sys_call
766.end sys_sigreturn 780.end sys_sigreturn
767 781
@@ -770,47 +784,19 @@ sys_sigreturn:
770 .ent sys_rt_sigreturn 784 .ent sys_rt_sigreturn
771sys_rt_sigreturn: 785sys_rt_sigreturn:
772 .prologue 0 786 .prologue 0
787 lda $9, ret_from_straced
788 cmpult $26, $9, $9
773 mov $sp, $17 789 mov $sp, $17
774 lda $18, -SWITCH_STACK_SIZE($sp) 790 lda $18, -SWITCH_STACK_SIZE($sp)
775 lda $sp, -SWITCH_STACK_SIZE($sp) 791 lda $sp, -SWITCH_STACK_SIZE($sp)
776 jsr $26, do_rt_sigreturn 792 jsr $26, do_rt_sigreturn
777 br $1, undo_switch_stack 793 bne $9, 1f
794 jsr $26, syscall_trace
7951: br $1, undo_switch_stack
778 br ret_from_sys_call 796 br ret_from_sys_call
779.end sys_rt_sigreturn 797.end sys_rt_sigreturn
780 798
781 .align 4 799 .align 4
782 .globl sys_sigsuspend
783 .ent sys_sigsuspend
784sys_sigsuspend:
785 .prologue 0
786 mov $sp, $17
787 br $1, do_switch_stack
788 mov $sp, $18
789 subq $sp, 16, $sp
790 stq $26, 0($sp)
791 jsr $26, do_sigsuspend
792 ldq $26, 0($sp)
793 lda $sp, SWITCH_STACK_SIZE+16($sp)
794 ret
795.end sys_sigsuspend
796
797 .align 4
798 .globl sys_rt_sigsuspend
799 .ent sys_rt_sigsuspend
800sys_rt_sigsuspend:
801 .prologue 0
802 mov $sp, $18
803 br $1, do_switch_stack
804 mov $sp, $19
805 subq $sp, 16, $sp
806 stq $26, 0($sp)
807 jsr $26, do_rt_sigsuspend
808 ldq $26, 0($sp)
809 lda $sp, SWITCH_STACK_SIZE+16($sp)
810 ret
811.end sys_rt_sigsuspend
812
813 .align 4
814 .globl sys_sethae 800 .globl sys_sethae
815 .ent sys_sethae 801 .ent sys_sethae
816sys_sethae: 802sys_sethae:
@@ -929,15 +915,6 @@ sys_execve:
929.end sys_execve 915.end sys_execve
930 916
931 .align 4 917 .align 4
932 .globl osf_sigprocmask
933 .ent osf_sigprocmask
934osf_sigprocmask:
935 .prologue 0
936 mov $sp, $18
937 jmp $31, sys_osf_sigprocmask
938.end osf_sigprocmask
939
940 .align 4
941 .globl alpha_ni_syscall 918 .globl alpha_ni_syscall
942 .ent alpha_ni_syscall 919 .ent alpha_ni_syscall
943alpha_ni_syscall: 920alpha_ni_syscall: