1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Author: Huacai Chen <chenhuacai@loongson.cn>
4  * Copyright (C) 2020 Loongson Technology Corporation Limited
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the
8  * Free Software Foundation;  either version 2 of the  License, or (at your
9  * option) any later version.
10  */
11 
12 #ifndef __ASM_VDSO_H
13 #define __ASM_VDSO_H
14 
15 #include <linux/mm.h>
16 #include <linux/mm_types.h>
17 #include <vdso/datapage.h>
18 
19 #include <asm/barrier.h>
20 
21 /*
22  * struct loongarch_vdso_info - Details of a VDSO image.
23  * @vdso: Pointer to VDSO image (page-aligned).
24  * @size: Size of the VDSO image (page-aligned).
25  * @off_rt_sigreturn: Offset of the rt_sigreturn() trampoline.
26  * @code_mapping: Special mapping structure for vdso code.
27  * @code_mapping: Special mapping structure for vdso data.
28  *
29  * This structure contains details of a VDSO image, including the image data
30  * and offsets of certain symbols required by the kernel. It is generated as
31  * part of the VDSO build process, aside from the mapping page array, which is
32  * populated at runtime.
33  */
34 struct loongarch_vdso_info {
35 	void *vdso;
36 	unsigned long size;
37 	unsigned long offset_sigreturn;
38 	struct vm_special_mapping code_mapping;
39 	struct vm_special_mapping data_mapping;
40 };
41 
42 extern struct loongarch_vdso_info vdso_info;
43 
44 #endif /* __ASM_VDSO_H */
45