2020-03-13 12:51:33 -07: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 00:38:10 -07:00
|
|
|
#define __SYSCALL(nr, sym) extern long __x64_##sym(const struct pt_regs *);
|
2024-06-25 23:02:00 -07:00
|
|
|
#define __SYSCALL_NORETURN(nr, sym) extern long __noreturn __x64_##sym(const struct pt_regs *);
|
2021-05-17 00:38:10 -07:00
|
|
|
#include <asm/syscalls_x32.h>
|
2024-06-25 23:02:00 -07:00
|
|
|
#undef __SYSCALL
|
2020-03-13 12:51:33 -07:00
|
|
|
|
2024-06-25 23:02:00 -07:00
|
|
|
#undef __SYSCALL_NORETURN
|
|
|
|
#define __SYSCALL_NORETURN __SYSCALL
|
2020-03-13 12:51:33 -07:00
|
|
|
|
2024-06-25 23:02:00 -07:00
|
|
|
#define __SYSCALL(nr, sym) case nr: return __x64_##sym(regs);
|
2024-04-03 16:36:44 -07: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 12:51:33 -07:00
|
|
|
};
|