mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 06:47:41 +07:00
ca9eb49aa9
The generic copy_siginfo() is currently defined in asm-generic/siginfo.h, after including uapi/asm-generic/siginfo.h which defines the generic struct siginfo. However this makes it awkward for an architecture to use it if it has to define its own struct siginfo (e.g. MIPS and potentially IA64), since it means that asm-generic/siginfo.h can only be included after defining the arch-specific siginfo, which may be problematic if the arch-specific definition needs definitions from uapi/asm-generic/siginfo.h. It is possible to work around this by first including uapi/asm-generic/siginfo.h to get the constants before defining the arch-specific siginfo, and include asm-generic/siginfo.h after. However uapi headers can't be included by other uapi headers, so that first include has to be in an ifdef __kernel__, with the non __kernel__ case including the non-UAPI header instead. Instead of that mess, move the generic copy_siginfo() definition into linux/signal.h, which allows an arch-specific uapi/asm/siginfo.h to include asm-generic/siginfo.h and define the arch-specific siginfo, and for the generic copy_siginfo() to see that arch-specific definition. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Petr Malat <oss@malat.biz> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Christopher Ferris <cferris@google.com> Cc: linux-arch@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-ia64@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: <stable@vger.kernel.org> # 4.0- Patchwork: https://patchwork.linux-mips.org/patch/12478/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
23 lines
568 B
C
23 lines
568 B
C
#ifndef _ASM_GENERIC_SIGINFO_H
|
|
#define _ASM_GENERIC_SIGINFO_H
|
|
|
|
#include <uapi/asm-generic/siginfo.h>
|
|
|
|
#define __SI_MASK 0xffff0000u
|
|
#define __SI_KILL (0 << 16)
|
|
#define __SI_TIMER (1 << 16)
|
|
#define __SI_POLL (2 << 16)
|
|
#define __SI_FAULT (3 << 16)
|
|
#define __SI_CHLD (4 << 16)
|
|
#define __SI_RT (5 << 16)
|
|
#define __SI_MESGQ (6 << 16)
|
|
#define __SI_SYS (7 << 16)
|
|
#define __SI_CODE(T,N) ((T) | ((N) & 0xffff))
|
|
|
|
struct siginfo;
|
|
void do_schedule_next_timer(struct siginfo *info);
|
|
|
|
extern int copy_siginfo_to_user(struct siginfo __user *to, const struct siginfo *from);
|
|
|
|
#endif
|