Merge branch 'work.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-2.6-block.git] / arch / x86 / entry / syscall_32.c
CommitLineData
b2441318 1// SPDX-License-Identifier: GPL-2.0
303395ac
PA
2/* System call table for i386. */
3
4#include <linux/linkage.h>
5#include <linux/sys.h>
6#include <linux/cache.h>
7#include <asm/asm-offsets.h>
034042cc 8#include <asm/syscall.h>
303395ac 9
f8781c4a 10#ifdef CONFIG_IA32_EMULATION
ebeb8c82
DB
11/* On X86_64, we use struct pt_regs * to pass parameters to syscalls */
12#define __SYSCALL_I386(nr, sym, qual) extern asmlinkage long sym(const struct pt_regs *);
13
14/* this is a lie, but it does not hurt as sys_ni_syscall just returns -EINVAL */
15extern asmlinkage long sys_ni_syscall(const struct pt_regs *);
16
f8781c4a 17#else /* CONFIG_IA32_EMULATION */
ebeb8c82
DB
18#define __SYSCALL_I386(nr, sym, qual) extern asmlinkage long sym(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long);
19extern asmlinkage long sys_ni_syscall(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long);
f8781c4a 20#endif /* CONFIG_IA32_EMULATION */
ebeb8c82 21
303395ac
PA
22#include <asm/syscalls_32.h>
23#undef __SYSCALL_I386
24
cfcbadb4 25#define __SYSCALL_I386(nr, sym, qual) [nr] = sym,
303395ac 26
bace7117 27__visible const sys_call_ptr_t ia32_sys_call_table[__NR_syscall_compat_max+1] = {
303395ac 28 /*
61f1e7e2 29 * Smells like a compiler bug -- it doesn't work
303395ac
PA
30 * when the & below is removed.
31 */
bace7117 32 [0 ... __NR_syscall_compat_max] = &sys_ni_syscall,
303395ac
PA
33#include <asm/syscalls_32.h>
34};