18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
28c2ecf20Sopenharmony_ci#ifndef _ASM_POWERPC_UCONTEXT_H
38c2ecf20Sopenharmony_ci#define _ASM_POWERPC_UCONTEXT_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#ifdef __powerpc64__
68c2ecf20Sopenharmony_ci#include <asm/sigcontext.h>
78c2ecf20Sopenharmony_ci#else
88c2ecf20Sopenharmony_ci#include <asm/elf.h>
98c2ecf20Sopenharmony_ci#endif
108c2ecf20Sopenharmony_ci#include <asm/signal.h>
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#ifndef __powerpc64__
138c2ecf20Sopenharmony_cistruct mcontext {
148c2ecf20Sopenharmony_ci	elf_gregset_t	mc_gregs;
158c2ecf20Sopenharmony_ci	elf_fpregset_t	mc_fregs;
168c2ecf20Sopenharmony_ci	unsigned long	mc_pad[2];
178c2ecf20Sopenharmony_ci	elf_vrregset_t	mc_vregs __attribute__((__aligned__(16)));
188c2ecf20Sopenharmony_ci};
198c2ecf20Sopenharmony_ci#endif
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_cistruct ucontext {
228c2ecf20Sopenharmony_ci	unsigned long	uc_flags;
238c2ecf20Sopenharmony_ci	struct ucontext __user *uc_link;
248c2ecf20Sopenharmony_ci	stack_t		uc_stack;
258c2ecf20Sopenharmony_ci#ifndef __powerpc64__
268c2ecf20Sopenharmony_ci	int		uc_pad[7];
278c2ecf20Sopenharmony_ci	struct mcontext	__user *uc_regs;/* points to uc_mcontext field */
288c2ecf20Sopenharmony_ci#endif
298c2ecf20Sopenharmony_ci	sigset_t	uc_sigmask;
308c2ecf20Sopenharmony_ci	/* glibc has 1024-bit signal masks, ours are 64-bit */
318c2ecf20Sopenharmony_ci#ifdef __powerpc64__
328c2ecf20Sopenharmony_ci	sigset_t	__unused[15];	/* Allow for uc_sigmask growth */
338c2ecf20Sopenharmony_ci	struct sigcontext uc_mcontext;	/* last for extensibility */
348c2ecf20Sopenharmony_ci#else
358c2ecf20Sopenharmony_ci	int		uc_maskext[30];
368c2ecf20Sopenharmony_ci	int		uc_pad2[3];
378c2ecf20Sopenharmony_ci	struct mcontext	uc_mcontext;
388c2ecf20Sopenharmony_ci#endif
398c2ecf20Sopenharmony_ci};
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci#endif /* _ASM_POWERPC_UCONTEXT_H */
42