alpha cleanups and fixes; one thing *not* included is lazy FPU

switching stuff - this pile is just the straightforward stuff.
 
 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
 -----BEGIN PGP SIGNATURE-----
 
 iHQEABYIAB0WIQQqUNBr3gm4hGXdBJlZ7Krx/gZQ6wUCY5Z1HgAKCRBZ7Krx/gZQ
 6/uMAPYmK7k68XYuFKsMsxMisGY2mL2NDKBQmf3upk+e1Be6AQCOnG8tA9xGkZ4v
 e/b3oW04Hwrwp3cSzH7hVHiQiPCQAw==
 =v5DV
 -----END PGP SIGNATURE-----

Merge tag 'pull-alpha' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull alpha updates from Al Viro:
 "Alpha architecture cleanups and fixes.

  One thing *not* included is lazy FPU switching stuff - this pile is
  just the straightforward stuff"

* tag 'pull-alpha' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  alpha: ret_from_fork can go straight to ret_to_user
  alpha: syscall exit cleanup
  alpha: fix handling of a3 on straced syscalls
  alpha: fix syscall entry in !AUDUT_SYSCALL case
  alpha: _TIF_ALLWORK_MASK is unused
  alpha: fix TIF_NOTIFY_SIGNAL handling
This commit is contained in:
Linus Torvalds 2022-12-12 18:27:06 -08:00
commit 268369b171
2 changed files with 7 additions and 13 deletions

View File

@ -75,11 +75,7 @@ register struct thread_info *__current_thread_info __asm__("$8");
/* Work to do on interrupt/exception return. */
#define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \
_TIF_NOTIFY_RESUME)
/* Work to do on any return to userspace. */
#define _TIF_ALLWORK_MASK (_TIF_WORK_MASK \
| _TIF_SYSCALL_TRACE)
_TIF_NOTIFY_RESUME | _TIF_NOTIFY_SIGNAL)
#define TS_UAC_NOPRINT 0x0001 /* ! Preserve the following three */
#define TS_UAC_NOFIX 0x0002 /* ! flags as they match */

View File

@ -469,13 +469,16 @@ entSys:
#ifdef CONFIG_AUDITSYSCALL
lda $6, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT
and $3, $6, $3
#endif
bne $3, strace
#else
blbs $3, strace /* check for SYSCALL_TRACE in disguise */
#endif
beq $4, 1f
ldq $27, 0($5)
1: jsr $26, ($27), sys_ni_syscall
ldgp $gp, 0($26)
blt $0, $syscall_error /* the call failed */
$ret_success:
stq $0, 0($sp)
stq $31, 72($sp) /* a3=0 => no error */
@ -525,11 +528,6 @@ $syscall_error:
stq $1, 72($sp) /* a3 for return */
br ret_from_sys_call
$ret_success:
stq $0, 0($sp)
stq $31, 72($sp) /* a3=0 => no error */
br ret_from_sys_call
/*
* Do all cleanup when returning from all interrupts and system calls.
*
@ -598,8 +596,8 @@ ret_from_straced:
/* check return.. */
blt $0, $strace_error /* the call failed */
stq $31, 72($sp) /* a3=0 => no error */
$strace_success:
stq $31, 72($sp) /* a3=0 => no error */
stq $0, 0($sp) /* save return value */
DO_SWITCH_STACK
@ -768,7 +766,7 @@ alpha_switch_to:
.align 4
.ent ret_from_fork
ret_from_fork:
lda $26, ret_from_sys_call
lda $26, ret_to_user
mov $17, $16
jmp $31, schedule_tail
.end ret_from_fork