linux_dsm_epyc7002/arch/x86/um/shared/sysdep/mcontext.h
Al Viro 5c48b108ec um: take arch/um/sys-x86 to arch/x86/um
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
2011-11-02 14:15:05 +01:00

32 lines
614 B
C

/*
* Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/
#ifndef __SYS_SIGCONTEXT_X86_H
#define __SYS_SIGCONTEXT_X86_H
extern void get_regs_from_mc(struct uml_pt_regs *, mcontext_t *);
#ifdef __i386__
#define GET_FAULTINFO_FROM_MC(fi, mc) \
{ \
(fi).cr2 = (mc)->cr2; \
(fi).error_code = (mc)->gregs[REG_ERR]; \
(fi).trap_no = (mc)->gregs[REG_TRAPNO]; \
}
#else
#define GET_FAULTINFO_FROM_MC(fi, mc) \
{ \
(fi).cr2 = (mc)->gregs[REG_CR2]; \
(fi).error_code = (mc)->gregs[REG_ERR]; \
(fi).trap_no = (mc)->gregs[REG_TRAPNO]; \
}
#endif
#endif