sparc: Use Linux kABI for syscall return
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 28 Jan 2020 22:33:01 +0000 (19:33 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Sat, 15 Feb 2020 00:09:12 +0000 (21:09 -0300)
commit86c5d2cf0ce046279baddc7faa27da71f1a89fde
tree7c5c1317788df62120f457da5829ca5f7bdbde86
parente26b8a008ae6f45f6aa2dd56f6d6ce13f181df9f
sparc: Use Linux kABI for syscall return

It changes the sparc internal_syscall* macros to return a negative
value instead of the 'g1' register value in the 'err' macro argument.
The __SYSCALL_STRING macro is also changed to no set the 'g1'
value, since 'o1' already holds all the required information
to check if syscall has failed.

The macro INTERNAL_SYSCALL_DECL is no longer required, and the
INTERNAL_SYSCALL_ERROR_P macro follows the other Linux kABIs.
The redefinition of INTERNAL_VSYSCALL_CALL is also no longer
required.

Checked on sparc64-linux-gnu and sparcv9-linux-gnu. It fixes
the sporadic issues on sparc32 where clock_nanosleep does not
act as cancellation entrypoint.
sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h
sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
sysdeps/unix/sysv/linux/sparc/sysdep.h