162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#ifndef _ASM_POWERPC_SECCOMP_H
362306a36Sopenharmony_ci#define _ASM_POWERPC_SECCOMP_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci#include <linux/unistd.h>
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci#define __NR_seccomp_sigreturn_32 __NR_sigreturn
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci#include <asm-generic/seccomp.h>
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci#ifdef __LITTLE_ENDIAN__
1262306a36Sopenharmony_ci#define __SECCOMP_ARCH_LE		__AUDIT_ARCH_LE
1362306a36Sopenharmony_ci#define __SECCOMP_ARCH_LE_NAME		"le"
1462306a36Sopenharmony_ci#else
1562306a36Sopenharmony_ci#define __SECCOMP_ARCH_LE		0
1662306a36Sopenharmony_ci#define __SECCOMP_ARCH_LE_NAME
1762306a36Sopenharmony_ci#endif
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci#ifdef CONFIG_PPC64
2062306a36Sopenharmony_ci# define SECCOMP_ARCH_NATIVE		(AUDIT_ARCH_PPC64 | __SECCOMP_ARCH_LE)
2162306a36Sopenharmony_ci# define SECCOMP_ARCH_NATIVE_NR		NR_syscalls
2262306a36Sopenharmony_ci# define SECCOMP_ARCH_NATIVE_NAME	"ppc64" __SECCOMP_ARCH_LE_NAME
2362306a36Sopenharmony_ci# ifdef CONFIG_COMPAT
2462306a36Sopenharmony_ci#  define SECCOMP_ARCH_COMPAT		(AUDIT_ARCH_PPC | __SECCOMP_ARCH_LE)
2562306a36Sopenharmony_ci#  define SECCOMP_ARCH_COMPAT_NR	NR_syscalls
2662306a36Sopenharmony_ci#  define SECCOMP_ARCH_COMPAT_NAME	"ppc" __SECCOMP_ARCH_LE_NAME
2762306a36Sopenharmony_ci# endif
2862306a36Sopenharmony_ci#else /* !CONFIG_PPC64 */
2962306a36Sopenharmony_ci# define SECCOMP_ARCH_NATIVE		(AUDIT_ARCH_PPC | __SECCOMP_ARCH_LE)
3062306a36Sopenharmony_ci# define SECCOMP_ARCH_NATIVE_NR		NR_syscalls
3162306a36Sopenharmony_ci# define SECCOMP_ARCH_NATIVE_NAME	"ppc" __SECCOMP_ARCH_LE_NAME
3262306a36Sopenharmony_ci#endif
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci#endif	/* _ASM_POWERPC_SECCOMP_H */
35