blob: 9ee85066f4072f185c2de1f29a0a41672f3bfb6b [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);
Borislav Petkovbeca4e22018-01-04 17:42:45 +010015extern bool vsyscall_enabled(void);
Ben Hutchings9a0be5a2018-01-26 16:23:02 +000016extern unsigned long vsyscall_pgprot;
Andy Lutomirski1ad83c82014-10-29 14:33:47 -070017#else
18static inline void map_vsyscall(void) {}
19static inline bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
20{
21 return false;
22}
Borislav Petkovbeca4e22018-01-04 17:42:45 +010023static inline bool vsyscall_enabled(void) { return false; }
Andy Lutomirski1ad83c82014-10-29 14:33:47 -070024#endif
Andy Lutomirski3ae36652011-08-10 11:15:32 -040025
H. Peter Anvin1965aae2008-10-22 22:26:29 -070026#endif /* _ASM_X86_VSYSCALL_H */