83 lines
1.9 KiB
C
Raw Normal View History

2026-01-21 18:59:54 +08:00
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2012 ARM Ltd.
*/
#ifndef __ASM_SIGNAL32_H
#define __ASM_SIGNAL32_H
2026-01-29 22:25:33 +08:00
#ifdef CONFIG_AARCH32_EL0
2026-01-21 18:59:54 +08:00
#include <linux/compat.h>
2026-01-29 22:25:33 +08:00
struct a32_sigcontext {
2026-01-21 18:59:54 +08:00
/* We always set these two fields to 0 */
compat_ulong_t trap_no;
compat_ulong_t error_code;
compat_ulong_t oldmask;
compat_ulong_t arm_r0;
compat_ulong_t arm_r1;
compat_ulong_t arm_r2;
compat_ulong_t arm_r3;
compat_ulong_t arm_r4;
compat_ulong_t arm_r5;
compat_ulong_t arm_r6;
compat_ulong_t arm_r7;
compat_ulong_t arm_r8;
compat_ulong_t arm_r9;
compat_ulong_t arm_r10;
compat_ulong_t arm_fp;
compat_ulong_t arm_ip;
compat_ulong_t arm_sp;
compat_ulong_t arm_lr;
compat_ulong_t arm_pc;
compat_ulong_t arm_cpsr;
compat_ulong_t fault_address;
};
2026-01-29 22:25:33 +08:00
struct a32_ucontext {
2026-01-21 18:59:54 +08:00
compat_ulong_t uc_flags;
compat_uptr_t uc_link;
compat_stack_t uc_stack;
2026-01-29 22:25:33 +08:00
struct a32_sigcontext uc_mcontext;
2026-01-21 18:59:54 +08:00
compat_sigset_t uc_sigmask;
int __unused[32 - (sizeof(compat_sigset_t) / sizeof(int))];
compat_ulong_t uc_regspace[128] __attribute__((__aligned__(8)));
};
2026-01-29 22:25:33 +08:00
struct a32_sigframe {
struct a32_ucontext uc;
2026-01-21 18:59:54 +08:00
compat_ulong_t retcode[2];
};
2026-01-29 22:25:33 +08:00
struct a32_rt_sigframe {
2026-01-21 18:59:54 +08:00
struct compat_siginfo info;
2026-01-29 22:25:33 +08:00
struct a32_sigframe sig;
2026-01-21 18:59:54 +08:00
};
2026-01-29 22:25:33 +08:00
int a32_setup_frame(int usig, struct ksignal *ksig, sigset_t *set,
2026-01-21 18:59:54 +08:00
struct pt_regs *regs);
2026-01-29 22:25:33 +08:00
int a32_setup_rt_frame(int usig, struct ksignal *ksig, sigset_t *set,
2026-01-21 18:59:54 +08:00
struct pt_regs *regs);
2026-01-29 22:25:33 +08:00
void a32_setup_restart_syscall(struct pt_regs *regs);
2026-01-21 18:59:54 +08:00
#else
2026-01-29 22:25:33 +08:00
static inline int a32_setup_frame(int usid, struct ksignal *ksig,
2026-01-21 18:59:54 +08:00
sigset_t *set, struct pt_regs *regs)
{
return -ENOSYS;
}
2026-01-29 22:25:33 +08:00
static inline int a32_setup_rt_frame(int usig, struct ksignal *ksig, sigset_t *set,
2026-01-21 18:59:54 +08:00
struct pt_regs *regs)
{
return -ENOSYS;
}
2026-01-29 22:25:33 +08:00
static inline void a32_setup_restart_syscall(struct pt_regs *regs)
2026-01-21 18:59:54 +08:00
{
}
2026-01-29 22:25:33 +08:00
#endif /* CONFIG_AARCH32_EL0 */
2026-01-21 18:59:54 +08:00
#endif /* __ASM_SIGNAL32_H */