diff options
Diffstat (limited to 'arch/x86/include/asm/context_tracking.h')
-rw-r--r-- | arch/x86/include/asm/context_tracking.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/x86/include/asm/context_tracking.h b/arch/x86/include/asm/context_tracking.h new file mode 100644 index 000000000000..1616562683e9 --- /dev/null +++ b/arch/x86/include/asm/context_tracking.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #ifndef _ASM_X86_CONTEXT_TRACKING_H | ||
2 | #define _ASM_X86_CONTEXT_TRACKING_H | ||
3 | |||
4 | #ifndef __ASSEMBLY__ | ||
5 | #include <linux/context_tracking.h> | ||
6 | #include <asm/ptrace.h> | ||
7 | |||
8 | static inline void exception_enter(struct pt_regs *regs) | ||
9 | { | ||
10 | user_exit(); | ||
11 | } | ||
12 | |||
13 | static inline void exception_exit(struct pt_regs *regs) | ||
14 | { | ||
15 | #ifdef CONFIG_CONTEXT_TRACKING | ||
16 | if (user_mode(regs)) | ||
17 | user_enter(); | ||
18 | #endif | ||
19 | } | ||
20 | |||
21 | #else /* __ASSEMBLY__ */ | ||
22 | |||
23 | #ifdef CONFIG_CONTEXT_TRACKING | ||
24 | # define SCHEDULE_USER call schedule_user | ||
25 | #else | ||
26 | # define SCHEDULE_USER call schedule | ||
27 | #endif | ||
28 | |||
29 | #endif /* !__ASSEMBLY__ */ | ||
30 | |||
31 | #endif | ||