From 12b57c5c70f397a9410411d4e348096edada20f9 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Sun, 30 Dec 2018 15:16:48 +0100 Subject: alpha: update syscall macro definitions Other architectures commonly use __NR_umount2 for sys_umount, only ia64 and alpha use __NR_umount here. In order to synchronize the generated tables, use umount2 like everyone else, and add back the old name from asm/unistd.h for compatibility. For shmat, alpha uses the osf_shmat name, we can do the same thing here, which means we don't have to add an entry in the __IGNORE list now that shmat is mandatory everywhere alarm, creat, pause, time, and utime are optional everywhere these days, no need to list them here any more. I considered also adding the regular versions of the get*id system calls that have different names and calling conventions on alpha, which would further help unify the syscall ABI, but for now I decided against that. Signed-off-by: Arnd Bergmann --- arch/alpha/include/asm/unistd.h | 6 ------ arch/alpha/include/uapi/asm/unistd.h | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'arch/alpha/include') diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h index 21b706a5b772..564ba87bdc38 100644 --- a/arch/alpha/include/asm/unistd.h +++ b/arch/alpha/include/asm/unistd.h @@ -22,18 +22,12 @@ /* * Ignore legacy syscalls that we don't use. */ -#define __IGNORE_alarm -#define __IGNORE_creat #define __IGNORE_getegid #define __IGNORE_geteuid #define __IGNORE_getgid #define __IGNORE_getpid #define __IGNORE_getppid #define __IGNORE_getuid -#define __IGNORE_pause -#define __IGNORE_time -#define __IGNORE_utime -#define __IGNORE_umount2 /* Alpha doesn't have protection keys. */ #define __IGNORE_pkey_mprotect diff --git a/arch/alpha/include/uapi/asm/unistd.h b/arch/alpha/include/uapi/asm/unistd.h index 9ba724f116f1..4507071f995f 100644 --- a/arch/alpha/include/uapi/asm/unistd.h +++ b/arch/alpha/include/uapi/asm/unistd.h @@ -2,6 +2,11 @@ #ifndef _UAPI_ALPHA_UNISTD_H #define _UAPI_ALPHA_UNISTD_H +/* These are traditionally the names linux-alpha uses for + * the two otherwise generic system calls */ +#define __NR_umount __NR_umount2 +#define __NR_osf_shmat __NR_shmat + #include #endif /* _UAPI_ALPHA_UNISTD_H */ -- cgit v1.2.1 From b41c51c8e194c0bdfb4b1778a137aea8246c86cd Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 31 Dec 2018 23:12:32 +0100 Subject: arch: add pkey and rseq syscall numbers everywhere Most architectures define system call numbers for the rseq and pkey system calls, even when they don't support the features, and perhaps never will. Only a few architectures are missing these, so just define them anyway for consistency. If we decide to add them later to one of these, the system call numbers won't get out of sync then. Signed-off-by: Arnd Bergmann Acked-by: Heiko Carstens Acked-by: Geert Uytterhoeven --- arch/alpha/include/asm/unistd.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'arch/alpha/include') diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h index 564ba87bdc38..31ad350b58a0 100644 --- a/arch/alpha/include/asm/unistd.h +++ b/arch/alpha/include/asm/unistd.h @@ -29,9 +29,5 @@ #define __IGNORE_getppid #define __IGNORE_getuid -/* Alpha doesn't have protection keys. */ -#define __IGNORE_pkey_mprotect -#define __IGNORE_pkey_alloc -#define __IGNORE_pkey_free #endif /* _ALPHA_UNISTD_H */ -- cgit v1.2.1 From ecf7e0a4ad1528710c90f0a6f4285741ac525f6e Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 11 Jan 2019 15:09:11 +0100 Subject: alpha: add generic get{eg,eu,g,p,u,pp}id() syscalls Alpha has traditionally followed the OSF1 calling conventions here, with its getxpid, getxuid, getxgid system calls returning two different values in separate registers. Following what glibc has done here, we can define getpid, getuid and getgid to be aliases for getxpid, getxuid and getxgid respectively, and add new system call numbers for getppid, geteuid and getegid. Signed-off-by: Arnd Bergmann --- arch/alpha/include/asm/unistd.h | 11 ----------- arch/alpha/include/uapi/asm/unistd.h | 5 +++++ 2 files changed, 5 insertions(+), 11 deletions(-) (limited to 'arch/alpha/include') diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h index 31ad350b58a0..986f5da9b7d8 100644 --- a/arch/alpha/include/asm/unistd.h +++ b/arch/alpha/include/asm/unistd.h @@ -19,15 +19,4 @@ #define __ARCH_WANT_SYS_VFORK #define __ARCH_WANT_SYS_CLONE -/* - * Ignore legacy syscalls that we don't use. - */ -#define __IGNORE_getegid -#define __IGNORE_geteuid -#define __IGNORE_getgid -#define __IGNORE_getpid -#define __IGNORE_getppid -#define __IGNORE_getuid - - #endif /* _ALPHA_UNISTD_H */ diff --git a/arch/alpha/include/uapi/asm/unistd.h b/arch/alpha/include/uapi/asm/unistd.h index 4507071f995f..71fd5db06866 100644 --- a/arch/alpha/include/uapi/asm/unistd.h +++ b/arch/alpha/include/uapi/asm/unistd.h @@ -7,6 +7,11 @@ #define __NR_umount __NR_umount2 #define __NR_osf_shmat __NR_shmat +/* These return an extra value but can be used as aliases */ +#define __NR_getpid __NR_getxpid +#define __NR_getuid __NR_getxuid +#define __NR_getgid __NR_getxgid + #include #endif /* _UAPI_ALPHA_UNISTD_H */ -- cgit v1.2.1