blob: 62210da19a929a5fef69e7f268471533a1076285 [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);
Andy Lutomirski1ad83c82014-10-29 14:33:47 -070016#else
17static inline void map_vsyscall(void) {}
18static inline bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
19{
20 return false;
21}
Borislav Petkovbeca4e22018-01-04 17:42:45 +010022static inline bool vsyscall_enabled(void) { return false; }
Andy Lutomirski1ad83c82014-10-29 14:33:47 -070023#endif
Hugh Dickins83946c32018-02-13 16:45:20 +010024extern unsigned long vsyscall_pgprot;
Andy Lutomirski3ae36652011-08-10 11:15:32 -040025
H. Peter Anvin1965aae2008-10-22 22:26:29 -070026#endif /* _ASM_X86_VSYSCALL_H */