blob: 27566e57e87d999c386d3ade383045e921747d6f [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
H. Peter Anvin1965aae2008-10-22 22:26:29 -07002#ifndef _ASM_X86_VDSO_H
3#define _ASM_X86_VDSO_H
Roland McGrath7f3646a2008-01-30 13:30:41 +01004
Andy Lutomirski9e6f4502014-03-20 18:57:18 -07005#include <asm/page_types.h>
6#include <linux/linkage.h>
Andy Lutomirski6f121e52014-05-05 12:19:34 -07007#include <linux/init.h>
Andy Lutomirski9e6f4502014-03-20 18:57:18 -07008
Andy Lutomirski6f121e52014-05-05 12:19:34 -07009#ifndef __ASSEMBLER__
Andy Lutomirski9e6f4502014-03-20 18:57:18 -070010
Andy Lutomirskia62c34b2014-05-19 15:58:33 -070011#include <linux/mm_types.h>
12
Andy Lutomirski6f121e52014-05-05 12:19:34 -070013struct vdso_image {
14 void *data;
15 unsigned long size; /* Always a multiple of PAGE_SIZE */
Andy Lutomirskia62c34b2014-05-19 15:58:33 -070016
Andy Lutomirski6f121e52014-05-05 12:19:34 -070017 unsigned long alt, alt_len;
Andy Lutomirski9e6f4502014-03-20 18:57:18 -070018
Andy Lutomirskie6577a72014-07-10 18:13:15 -070019 long sym_vvar_start; /* Negative offset to the vvar area */
Andy Lutomirski18d0a6f2014-05-05 12:19:35 -070020
Andy Lutomirskie6577a72014-07-10 18:13:15 -070021 long sym_vvar_page;
22 long sym_hpet_page;
Andy Lutomirskidac16fb2015-12-10 19:20:20 -080023 long sym_pvclock_page;
Vitaly Kuznetsov90b20432017-03-03 14:21:42 +010024 long sym_hvclock_page;
Andy Lutomirskie6577a72014-07-10 18:13:15 -070025 long sym_VDSO32_NOTE_MASK;
26 long sym___kernel_sigreturn;
27 long sym___kernel_rt_sigreturn;
28 long sym___kernel_vsyscall;
Andy Lutomirski8242c6c2015-10-05 17:48:01 -070029 long sym_int80_landing_pad;
Andy Lutomirski6f121e52014-05-05 12:19:34 -070030};
31
32#ifdef CONFIG_X86_64
33extern const struct vdso_image vdso_image_64;
34#endif
35
36#ifdef CONFIG_X86_X32
37extern const struct vdso_image vdso_image_x32;
38#endif
Andy Lutomirski9e6f4502014-03-20 18:57:18 -070039
Roland McGrath6c3652e2008-01-30 13:30:42 +010040#if defined CONFIG_X86_32 || defined CONFIG_COMPAT
Andy Lutomirski0a6d1fa2015-10-05 17:47:56 -070041extern const struct vdso_image vdso_image_32;
Roland McGrath6c3652e2008-01-30 13:30:42 +010042#endif
Roland McGrath7f3646a2008-01-30 13:30:41 +010043
Andy Lutomirski6f121e52014-05-05 12:19:34 -070044extern void __init init_vdso_image(const struct vdso_image *image);
Andy Lutomirskib4b541a2014-03-17 23:22:08 +010045
Dmitry Safonov2eefd872016-09-05 16:33:05 +030046extern int map_vdso_once(const struct vdso_image *image, unsigned long addr);
47
Andy Lutomirski9e6f4502014-03-20 18:57:18 -070048#endif /* __ASSEMBLER__ */
49
H. Peter Anvin1965aae2008-10-22 22:26:29 -070050#endif /* _ASM_X86_VDSO_H */