From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hajime Tazaki Subject: [RFC v3 02/26] arch: add __SYSCALL_DEFINE_ARCH Date: Wed, 5 Feb 2020 16:30:11 +0900 Message-ID: <67cc975b4ce5aaf1ce0e955d321a7487cf27d6a8.1580882335.git.thehajime@gmail.com> References: Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: linux-um-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Cc: Octavian Purdila , Akira Moroo , linux-kernel-library-uGLqWuYN4qMgsBAKwltoeQ@public.gmane.org, linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-arch.vger.kernel.org From: Octavian Purdila This allows the architecture code to process the system call definitions. It is used by LKL to create strong typed function definitions for system calls. Signed-off-by: Octavian Purdila Cc: linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org --- include/linux/syscalls.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 5262b7a76d39..d61069aa869a 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -203,9 +203,14 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event) } #endif +#ifndef __SYSCALL_DEFINE_ARCH +#define __SYSCALL_DEFINE_ARCH(x, sname, ...) +#endif + #ifndef SYSCALL_DEFINE0 #define SYSCALL_DEFINE0(sname) \ SYSCALL_METADATA(_##sname, 0); \ + __SYSCALL_DEFINE_ARCH(0, _##sname); \ asmlinkage long sys_##sname(void); \ ALLOW_ERROR_INJECTION(sys_##sname, ERRNO); \ asmlinkage long sys_##sname(void) @@ -222,6 +227,7 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event) #define SYSCALL_DEFINEx(x, sname, ...) \ SYSCALL_METADATA(sname, x, __VA_ARGS__) \ + __SYSCALL_DEFINE_ARCH(x, sname, __VA_ARGS__) \ __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) #define __PROTECT(...) asmlinkage_protect(__VA_ARGS__) -- 2.21.0 (Apple Git-122.2) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f195.google.com ([209.85.210.195]:40813 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725468AbgBEHar (ORCPT ); Wed, 5 Feb 2020 02:30:47 -0500 From: Hajime Tazaki Subject: [RFC v3 02/26] arch: add __SYSCALL_DEFINE_ARCH Date: Wed, 5 Feb 2020 16:30:11 +0900 Message-ID: <67cc975b4ce5aaf1ce0e955d321a7487cf27d6a8.1580882335.git.thehajime@gmail.com> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-arch-owner@vger.kernel.org List-ID: To: linux-um@lists.infradead.org Cc: Octavian Purdila , Akira Moroo , linux-kernel-library@freelists.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org Message-ID: <20200205073011.xY8TFhJA7hxC1BOCFBqDKkUr-kxyTI6ITmgflsD1ZtE@z> From: Octavian Purdila This allows the architecture code to process the system call definitions. It is used by LKL to create strong typed function definitions for system calls. Signed-off-by: Octavian Purdila Cc: linux-api@vger.kernel.org --- include/linux/syscalls.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 5262b7a76d39..d61069aa869a 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -203,9 +203,14 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event) } #endif +#ifndef __SYSCALL_DEFINE_ARCH +#define __SYSCALL_DEFINE_ARCH(x, sname, ...) +#endif + #ifndef SYSCALL_DEFINE0 #define SYSCALL_DEFINE0(sname) \ SYSCALL_METADATA(_##sname, 0); \ + __SYSCALL_DEFINE_ARCH(0, _##sname); \ asmlinkage long sys_##sname(void); \ ALLOW_ERROR_INJECTION(sys_##sname, ERRNO); \ asmlinkage long sys_##sname(void) @@ -222,6 +227,7 @@ static inline int is_syscall_trace_event(struct trace_event_call *tp_event) #define SYSCALL_DEFINEx(x, sname, ...) \ SYSCALL_METADATA(sname, x, __VA_ARGS__) \ + __SYSCALL_DEFINE_ARCH(x, sname, __VA_ARGS__) \ __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) #define __PROTECT(...) asmlinkage_protect(__VA_ARGS__) -- 2.21.0 (Apple Git-122.2)