blob: 684fb3a12ed364549fb4fdfe81b75f2ebccd7ecf [file] [log] [blame]
Ralf Baechle293c5bd2007-07-25 16:19:33 +01001#ifndef __ASM_SECCOMP_H
2
Ralf Baechle293c5bd2007-07-25 16:19:33 +01003#include <linux/unistd.h>
4
Matt Redfearnb1b4fad2016-03-29 09:35:33 +01005#ifdef CONFIG_COMPAT
6static inline const int *get_compat_mode1_syscalls(void)
7{
8 static const int syscalls_O32[] = {
9 __NR_O32_Linux + 3, __NR_O32_Linux + 4,
10 __NR_O32_Linux + 1, __NR_O32_Linux + 193,
11 0, /* null terminated */
12 };
13 static const int syscalls_N32[] = {
14 __NR_N32_Linux + 0, __NR_N32_Linux + 1,
15 __NR_N32_Linux + 58, __NR_N32_Linux + 211,
16 0, /* null terminated */
17 };
Ralf Baechle293c5bd2007-07-25 16:19:33 +010018
Matt Redfearnb1b4fad2016-03-29 09:35:33 +010019 if (config_enabled(CONFIG_MIPS32_O32) && test_thread_flag(TIF_32BIT_REGS))
20 return syscalls_O32;
Ralf Baechle293c5bd2007-07-25 16:19:33 +010021
Matt Redfearnb1b4fad2016-03-29 09:35:33 +010022 if (config_enabled(CONFIG_MIPS32_N32))
23 return syscalls_N32;
Ralf Baechle293c5bd2007-07-25 16:19:33 +010024
Matt Redfearnb1b4fad2016-03-29 09:35:33 +010025 BUG();
26}
Ralf Baechle293c5bd2007-07-25 16:19:33 +010027
Matt Redfearnb1b4fad2016-03-29 09:35:33 +010028#define get_compat_mode1_syscalls get_compat_mode1_syscalls
29
30#endif /* CONFIG_COMPAT */
Ralf Baechle293c5bd2007-07-25 16:19:33 +010031
Kees Cook97247fd2015-04-16 12:48:53 -070032#include <asm-generic/seccomp.h>
33
Ralf Baechle293c5bd2007-07-25 16:19:33 +010034#endif /* __ASM_SECCOMP_H */