mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-23 14:39:30 +07:00
b67bfd298f
NR_SYSCALLS macro holds the number of system call exist in alpha architecture. We have to change the value of NR- _SYSCALLS, if we add or delete a system call. One of the patch in this patch series has a script which will generate a uapi header based on syscall.tbl file. The syscall.tbl file contains the total number of system calls information. So we have two option to update NR_SY- CALLS value. 1. Update NR_SYSCALLS in asm/unistd.h manually by count- ing the no.of system calls. No need to update NR_SYS- CALLS until we either add a new system call or delete existing system call. 2. We can keep this feature it above mentioned script, that will count the number of syscalls and keep it in a generated file. In this case we don't need to expli- citly update NR_SYSCALLS in asm/unistd.h file. The 2nd option will be the recommended one. For that, I added the __NR_syscalls macro in uapi/asm/unistd.h along with NR_SYSCALLS asm/unistd.h. The macro __NR_syscalls also added for making the name convention same across all architecture. While __NR_syscalls isn't strictly part of the uapi, having it as part of the generated header to simplifies the implementation. We also need to enclose this macro with #ifdef __KERNEL__ to avoid side effects. Signed-off-by: Firoz Khan <firoz.khan@linaro.org> Signed-off-by: Matt Turner <mattst88@gmail.com>
44 lines
1.0 KiB
C
44 lines
1.0 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _ALPHA_UNISTD_H
|
|
#define _ALPHA_UNISTD_H
|
|
|
|
#include <uapi/asm/unistd.h>
|
|
|
|
#define NR_SYSCALLS __NR_syscalls
|
|
|
|
#define __ARCH_WANT_NEW_STAT
|
|
#define __ARCH_WANT_OLD_READDIR
|
|
#define __ARCH_WANT_STAT64
|
|
#define __ARCH_WANT_SYS_GETHOSTNAME
|
|
#define __ARCH_WANT_SYS_FADVISE64
|
|
#define __ARCH_WANT_SYS_GETPGRP
|
|
#define __ARCH_WANT_SYS_OLDUMOUNT
|
|
#define __ARCH_WANT_SYS_SIGPENDING
|
|
#define __ARCH_WANT_SYS_UTIME
|
|
#define __ARCH_WANT_SYS_FORK
|
|
#define __ARCH_WANT_SYS_VFORK
|
|
#define __ARCH_WANT_SYS_CLONE
|
|
|
|
/*
|
|
* 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
|
|
#define __IGNORE_pkey_alloc
|
|
#define __IGNORE_pkey_free
|
|
|
|
#endif /* _ALPHA_UNISTD_H */
|