From 975ace4eca4990bc1948d3a7a890de7f60e7e540 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Fri, 31 Jan 2020 19:41:25 +0000 Subject: alpha: Refactor syscall and Use Linux kABI for syscall return It highly unlikely that alpha will be ported to anything else than Linux, so this patch moves the generic unix syscall definition to Linux and adapt it to Linux kernel ABI. It changes the internal_syscall* macros to return a negative value instead of the '$19' register value on the 'err' macro argument. The macro INTERNAL_SYSCALL_DECL is no longer required, and the INTERNAL_SYSCALL_ERROR_P macro follows the other Linux kABIs. Checked on alpha-linux-gnu. --- sysdeps/unix/sysv/linux/alpha/ioperm.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'sysdeps/unix/sysv/linux/alpha/ioperm.c') diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index 086c782b9f..cf775674b4 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -196,12 +196,7 @@ stl_mb(unsigned int val, unsigned long addr) static inline void __sethae(unsigned long value) { - register unsigned long r16 __asm__("$16") = value; - register unsigned long r0 __asm__("$0") = __NR_sethae; - __asm__ __volatile__ ("callsys" - : "=r"(r0) - : "0"(r0), "r" (r16) - : inline_syscall_clobbers, "$19"); + INLINE_SYSCALL_CALL (sethae, value); } extern long __pciconfig_iobase(enum __pciconfig_iobase_which __which, -- cgit 1.4.1