xref: /openbmc/linux/arch/loongarch/include/asm/vdso.h (revision 6726d552)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Author: Huacai Chen <chenhuacai@loongson.cn>
4  * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
5  */
6 
7 #ifndef __ASM_VDSO_H
8 #define __ASM_VDSO_H
9 
10 #include <linux/mm.h>
11 #include <linux/mm_types.h>
12 #include <vdso/datapage.h>
13 
14 #include <asm/barrier.h>
15 
16 /*
17  * struct loongarch_vdso_info - Details of a VDSO image.
18  * @vdso: Pointer to VDSO image (page-aligned).
19  * @size: Size of the VDSO image (page-aligned).
20  * @off_rt_sigreturn: Offset of the rt_sigreturn() trampoline.
21  * @code_mapping: Special mapping structure for vdso code.
22  * @code_mapping: Special mapping structure for vdso data.
23  *
24  * This structure contains details of a VDSO image, including the image data
25  * and offsets of certain symbols required by the kernel. It is generated as
26  * part of the VDSO build process, aside from the mapping page array, which is
27  * populated at runtime.
28  */
29 struct loongarch_vdso_info {
30 	void *vdso;
31 	unsigned long size;
32 	unsigned long offset_sigreturn;
33 	struct vm_special_mapping code_mapping;
34 	struct vm_special_mapping data_mapping;
35 };
36 
37 extern struct loongarch_vdso_info vdso_info;
38 
39 #endif /* __ASM_VDSO_H */
40