18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef __ASM_SECCOMP_H 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci#include <linux/unistd.h> 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#ifdef CONFIG_COMPAT 78c2ecf20Sopenharmony_cistatic inline const int *get_compat_mode1_syscalls(void) 88c2ecf20Sopenharmony_ci{ 98c2ecf20Sopenharmony_ci static const int syscalls_O32[] = { 108c2ecf20Sopenharmony_ci __NR_O32_Linux + 3, __NR_O32_Linux + 4, 118c2ecf20Sopenharmony_ci __NR_O32_Linux + 1, __NR_O32_Linux + 193, 128c2ecf20Sopenharmony_ci -1, /* negative terminated */ 138c2ecf20Sopenharmony_ci }; 148c2ecf20Sopenharmony_ci static const int syscalls_N32[] = { 158c2ecf20Sopenharmony_ci __NR_N32_Linux + 0, __NR_N32_Linux + 1, 168c2ecf20Sopenharmony_ci __NR_N32_Linux + 58, __NR_N32_Linux + 211, 178c2ecf20Sopenharmony_ci -1, /* negative terminated */ 188c2ecf20Sopenharmony_ci }; 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci if (IS_ENABLED(CONFIG_MIPS32_O32) && test_thread_flag(TIF_32BIT_REGS)) 218c2ecf20Sopenharmony_ci return syscalls_O32; 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci if (IS_ENABLED(CONFIG_MIPS32_N32)) 248c2ecf20Sopenharmony_ci return syscalls_N32; 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci BUG(); 278c2ecf20Sopenharmony_ci} 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci#define get_compat_mode1_syscalls get_compat_mode1_syscalls 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#endif /* CONFIG_COMPAT */ 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#include <asm-generic/seccomp.h> 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci#endif /* __ASM_SECCOMP_H */ 36