H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 1 | #ifndef _ASM_X86_VSYSCALL_H |
| 2 | #define _ASM_X86_VSYSCALL_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | |
David Woodhouse | 75da736 | 2006-09-16 12:15:48 -0700 | [diff] [blame] | 4 | #include <linux/seqlock.h> |
David Howells | af170c5 | 2012-12-14 22:37:13 +0000 | [diff] [blame] | 5 | #include <uapi/asm/vsyscall.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | |
Andy Lutomirski | 1ad83c8 | 2014-10-29 14:33:47 -0700 | [diff] [blame] | 7 | #ifdef CONFIG_X86_VSYSCALL_EMULATION |
Ingo Molnar | e402644 | 2008-01-30 13:32:39 +0100 | [diff] [blame] | 8 | extern void map_vsyscall(void); |
| 9 | |
Andy Lutomirski | 3ae3665 | 2011-08-10 11:15:32 -0400 | [diff] [blame] | 10 | /* |
| 11 | * Called on instruction fetch fault in vsyscall page. |
| 12 | * Returns true if handled. |
| 13 | */ |
| 14 | extern bool emulate_vsyscall(struct pt_regs *regs, unsigned long address); |
Andy Lutomirski | 1ad83c8 | 2014-10-29 14:33:47 -0700 | [diff] [blame] | 15 | #else |
| 16 | static inline void map_vsyscall(void) {} |
| 17 | static inline bool emulate_vsyscall(struct pt_regs *regs, unsigned long address) |
| 18 | { |
| 19 | return false; |
| 20 | } |
| 21 | #endif |
Andy Lutomirski | 3ae3665 | 2011-08-10 11:15:32 -0400 | [diff] [blame] | 22 | |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 23 | #endif /* _ASM_X86_VSYSCALL_H */ |