2020-03-13 19:51:33 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
/* System call table for x32 ABI. */
|
|
|
|
|
|
|
|
#include <linux/linkage.h>
|
|
|
|
#include <linux/sys.h>
|
|
|
|
#include <linux/cache.h>
|
|
|
|
#include <linux/syscalls.h>
|
|
|
|
#include <asm/syscall.h>
|
|
|
|
|
2021-05-17 07:38:10 +00:00
|
|
|
#define __SYSCALL(nr, sym) extern long __x64_##sym(const struct pt_regs *);
|
2024-06-26 06:02:00 +00:00
|
|
|
#define __SYSCALL_NORETURN(nr, sym) extern long __noreturn __x64_##sym(const struct pt_regs *);
|
2021-05-17 07:38:10 +00:00
|
|
|
#include <asm/syscalls_x32.h>
|
2024-06-26 06:02:00 +00:00
|
|
|
#undef __SYSCALL
|
2020-03-13 19:51:33 +00:00
|
|
|
|
2024-06-26 06:02:00 +00:00
|
|
|
#undef __SYSCALL_NORETURN
|
|
|
|
#define __SYSCALL_NORETURN __SYSCALL
|
2020-03-13 19:51:33 +00:00
|
|
|
|
2024-06-26 06:02:00 +00:00
|
|
|
#define __SYSCALL(nr, sym) case nr: return __x64_##sym(regs);
|
2024-04-03 23:36:44 +00:00
|
|
|
long x32_sys_call(const struct pt_regs *regs, unsigned int nr)
|
|
|
|
{
|
|
|
|
switch (nr) {
|
|
|
|
#include <asm/syscalls_x32.h>
|
|
|
|
default: return __x64_sys_ni_syscall(regs);
|
|
|
|
}
|
2020-03-13 19:51:33 +00:00
|
|
|
};
|