xref: /openbmc/linux/arch/x86/include/asm/vsyscall.h (revision b24413180f5600bcb3bb70fbed5cf186b60864bd)
1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
21965aae3SH. Peter Anvin #ifndef _ASM_X86_VSYSCALL_H
31965aae3SH. Peter Anvin #define _ASM_X86_VSYSCALL_H
4bb898558SAl Viro 
5bb898558SAl Viro #include <linux/seqlock.h>
6af170c50SDavid Howells #include <uapi/asm/vsyscall.h>
7bb898558SAl Viro 
81ad83c85SAndy Lutomirski #ifdef CONFIG_X86_VSYSCALL_EMULATION
9bb898558SAl Viro extern void map_vsyscall(void);
10bb898558SAl Viro 
113ae36655SAndy Lutomirski /*
123ae36655SAndy Lutomirski  * Called on instruction fetch fault in vsyscall page.
133ae36655SAndy Lutomirski  * Returns true if handled.
143ae36655SAndy Lutomirski  */
153ae36655SAndy Lutomirski extern bool emulate_vsyscall(struct pt_regs *regs, unsigned long address);
161ad83c85SAndy Lutomirski #else
171ad83c85SAndy Lutomirski static inline void map_vsyscall(void) {}
181ad83c85SAndy Lutomirski static inline bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
191ad83c85SAndy Lutomirski {
201ad83c85SAndy Lutomirski 	return false;
211ad83c85SAndy Lutomirski }
221ad83c85SAndy Lutomirski #endif
233ae36655SAndy Lutomirski 
241965aae3SH. Peter Anvin #endif /* _ASM_X86_VSYSCALL_H */
25