18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef _ASM_X86_VSYSCALL_H 38c2ecf20Sopenharmony_ci#define _ASM_X86_VSYSCALL_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <linux/seqlock.h> 68c2ecf20Sopenharmony_ci#include <uapi/asm/vsyscall.h> 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifdef CONFIG_X86_VSYSCALL_EMULATION 98c2ecf20Sopenharmony_ciextern void map_vsyscall(void); 108c2ecf20Sopenharmony_ciextern void set_vsyscall_pgtable_user_bits(pgd_t *root); 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci/* 138c2ecf20Sopenharmony_ci * Called on instruction fetch fault in vsyscall page. 148c2ecf20Sopenharmony_ci * Returns true if handled. 158c2ecf20Sopenharmony_ci */ 168c2ecf20Sopenharmony_ciextern bool emulate_vsyscall(unsigned long error_code, 178c2ecf20Sopenharmony_ci struct pt_regs *regs, unsigned long address); 188c2ecf20Sopenharmony_ci#else 198c2ecf20Sopenharmony_cistatic inline void map_vsyscall(void) {} 208c2ecf20Sopenharmony_cistatic inline bool emulate_vsyscall(unsigned long error_code, 218c2ecf20Sopenharmony_ci struct pt_regs *regs, unsigned long address) 228c2ecf20Sopenharmony_ci{ 238c2ecf20Sopenharmony_ci return false; 248c2ecf20Sopenharmony_ci} 258c2ecf20Sopenharmony_ci#endif 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci#endif /* _ASM_X86_VSYSCALL_H */ 28