18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef _ASM_X86_VDSO_H
38c2ecf20Sopenharmony_ci#define _ASM_X86_VDSO_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <asm/page_types.h>
68c2ecf20Sopenharmony_ci#include <linux/linkage.h>
78c2ecf20Sopenharmony_ci#include <linux/init.h>
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#ifndef __ASSEMBLER__
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#include <linux/mm_types.h>
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_cistruct vdso_image {
148c2ecf20Sopenharmony_ci	void *data;
158c2ecf20Sopenharmony_ci	unsigned long size;   /* Always a multiple of PAGE_SIZE */
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci	unsigned long alt, alt_len;
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci	long sym_vvar_start;  /* Negative offset to the vvar area */
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci	long sym_vvar_page;
228c2ecf20Sopenharmony_ci	long sym_pvclock_page;
238c2ecf20Sopenharmony_ci	long sym_hvclock_page;
248c2ecf20Sopenharmony_ci	long sym_timens_page;
258c2ecf20Sopenharmony_ci	long sym_VDSO32_NOTE_MASK;
268c2ecf20Sopenharmony_ci	long sym___kernel_sigreturn;
278c2ecf20Sopenharmony_ci	long sym___kernel_rt_sigreturn;
288c2ecf20Sopenharmony_ci	long sym___kernel_vsyscall;
298c2ecf20Sopenharmony_ci	long sym_int80_landing_pad;
308c2ecf20Sopenharmony_ci};
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci#ifdef CONFIG_X86_64
338c2ecf20Sopenharmony_ciextern const struct vdso_image vdso_image_64;
348c2ecf20Sopenharmony_ci#endif
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci#ifdef CONFIG_X86_X32
378c2ecf20Sopenharmony_ciextern const struct vdso_image vdso_image_x32;
388c2ecf20Sopenharmony_ci#endif
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci#if defined CONFIG_X86_32 || defined CONFIG_COMPAT
418c2ecf20Sopenharmony_ciextern const struct vdso_image vdso_image_32;
428c2ecf20Sopenharmony_ci#endif
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ciextern void __init init_vdso_image(const struct vdso_image *image);
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ciextern int map_vdso_once(const struct vdso_image *image, unsigned long addr);
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci#endif /* __ASSEMBLER__ */
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci#endif /* _ASM_X86_VDSO_H */
51