blob: 6ba66ee79710ffdc19806994df22375859b95736 [file] [log] [blame]
H. Peter Anvin1965aae2008-10-22 22:26:29 -07001#ifndef _ASM_X86_VSYSCALL_H
2#define _ASM_X86_VSYSCALL_H
Linus Torvalds1da177e2005-04-16 15:20:36 -07003
David Woodhouse75da7362006-09-16 12:15:48 -07004#include <linux/seqlock.h>
David Howellsaf170c52012-12-14 22:37:13 +00005#include <uapi/asm/vsyscall.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07006
Andy Lutomirski1ad83c82014-10-29 14:33:47 -07007#ifdef CONFIG_X86_VSYSCALL_EMULATION
Ingo Molnare4026442008-01-30 13:32:39 +01008extern void map_vsyscall(void);
9
Andy Lutomirski3ae36652011-08-10 11:15:32 -040010/*
11 * Called on instruction fetch fault in vsyscall page.
12 * Returns true if handled.
13 */
14extern bool emulate_vsyscall(struct pt_regs *regs, unsigned long address);
Andy Lutomirski1ad83c82014-10-29 14:33:47 -070015#else
16static inline void map_vsyscall(void) {}
17static inline bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
18{
19 return false;
20}
21#endif
Andy Lutomirski3ae36652011-08-10 11:15:32 -040022
H. Peter Anvin1965aae2008-10-22 22:26:29 -070023#endif /* _ASM_X86_VSYSCALL_H */