1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * This file contains the table of syscall-handling functions.
4 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
6 * Largely rewritten by Cort Dougan (cort@cs.nmt.edu)
9 * Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com)
10 * PPC64 updates by Dave Engebretsen (engebret@us.ibm.com)
13 #include <linux/syscalls.h>
14 #include <linux/compat.h>
15 #include <asm/unistd.h>
16 #include <asm/syscalls.h>
18 #undef __SYSCALL_WITH_COMPAT
19 #define __SYSCALL_WITH_COMPAT(nr, entry, compat) __SYSCALL(nr, entry)
22 #ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER
23 #define __SYSCALL(nr, entry) [nr] = entry,
26 * Coerce syscall handlers with arbitrary parameters to common type
27 * requires cast to void* to avoid -Wcast-function-type.
29 #define __SYSCALL(nr, entry) [nr] = (void *) entry,
32 const syscall_fn sys_call_table
[] = {
34 #include <asm/syscall_table_64.h>
36 #include <asm/syscall_table_32.h>
41 #undef __SYSCALL_WITH_COMPAT
42 #define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, compat)
43 const syscall_fn compat_sys_call_table
[] = {
44 #include <asm/syscall_table_32.h>
46 #endif /* CONFIG_COMPAT */