2019-05-27 14:55:01 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
2005-10-10 20:36:14 +08:00
|
|
|
/*
|
|
|
|
* This file contains the table of syscall-handling functions.
|
|
|
|
* Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
|
|
|
|
*
|
|
|
|
* Largely rewritten by Cort Dougan (cort@cs.nmt.edu)
|
|
|
|
* and Paul Mackerras.
|
|
|
|
*
|
|
|
|
* Adapted for iSeries by Mike Corrigan (mikejc@us.ibm.com)
|
|
|
|
* PPC64 updates by Dave Engebretsen (engebret@us.ibm.com)
|
|
|
|
*/
|
|
|
|
|
2022-09-21 14:55:57 +08:00
|
|
|
#include <linux/syscalls.h>
|
|
|
|
#include <linux/compat.h>
|
|
|
|
#include <asm/unistd.h>
|
|
|
|
#include <asm/syscalls.h>
|
2005-10-10 20:36:14 +08:00
|
|
|
|
2022-09-21 14:56:01 +08:00
|
|
|
#undef __SYSCALL_WITH_COMPAT
|
2022-09-21 14:55:57 +08:00
|
|
|
#define __SYSCALL_WITH_COMPAT(nr, entry, compat) __SYSCALL(nr, entry)
|
2014-02-04 13:05:53 +08:00
|
|
|
|
2022-09-21 14:56:01 +08:00
|
|
|
#undef __SYSCALL
|
|
|
|
#ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER
|
2022-10-06 20:34:17 +08:00
|
|
|
#define __SYSCALL(nr, entry) [nr] = entry,
|
2022-09-21 14:56:01 +08:00
|
|
|
#else
|
2022-09-21 14:55:58 +08:00
|
|
|
/*
|
|
|
|
* Coerce syscall handlers with arbitrary parameters to common type
|
|
|
|
* requires cast to void* to avoid -Wcast-function-type.
|
|
|
|
*/
|
|
|
|
#define __SYSCALL(nr, entry) [nr] = (void *) entry,
|
2022-09-21 14:56:01 +08:00
|
|
|
#endif
|
2022-09-21 14:55:58 +08:00
|
|
|
|
|
|
|
const syscall_fn sys_call_table[] = {
|
2018-12-17 18:40:36 +08:00
|
|
|
#ifdef CONFIG_PPC64
|
|
|
|
#include <asm/syscall_table_64.h>
|
|
|
|
#else
|
|
|
|
#include <asm/syscall_table_32.h>
|
|
|
|
#endif
|
2022-09-21 14:55:57 +08:00
|
|
|
};
|
2014-02-04 13:05:53 +08:00
|
|
|
|
2018-12-17 18:40:35 +08:00
|
|
|
#ifdef CONFIG_COMPAT
|
2021-03-01 23:30:18 +08:00
|
|
|
#undef __SYSCALL_WITH_COMPAT
|
|
|
|
#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, compat)
|
2022-09-21 14:55:58 +08:00
|
|
|
const syscall_fn compat_sys_call_table[] = {
|
2021-03-01 23:30:18 +08:00
|
|
|
#include <asm/syscall_table_32.h>
|
2022-09-21 14:55:57 +08:00
|
|
|
};
|
|
|
|
#endif /* CONFIG_COMPAT */
|