xref: /openbmc/linux/arch/powerpc/include/asm/vdso.h (revision 91bf6955)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __PPC64_VDSO_H__
3 #define __PPC64_VDSO_H__
4 
5 #ifdef __KERNEL__
6 
7 /* Default link addresses for the vDSOs */
8 #define VDSO32_LBASE	0x0
9 #define VDSO64_LBASE	0x0
10 
11 /* Default map addresses for 32bit vDSO */
12 #define VDSO32_MBASE	0x100000
13 
14 #define VDSO_VERSION_STRING	LINUX_2.6.15
15 
16 #ifndef __ASSEMBLY__
17 
18 #ifdef CONFIG_PPC64
19 #include <generated/vdso64-offsets.h>
20 #endif
21 
22 #ifdef CONFIG_VDSO32
23 #include <generated/vdso32-offsets.h>
24 #endif
25 
26 #define VDSO64_SYMBOL(base, name) ((unsigned long)(base) + (vdso64_offset_##name))
27 
28 #define VDSO32_SYMBOL(base, name) ((unsigned long)(base) + (vdso32_offset_##name))
29 
30 /* Offsets relative to thread->vdso_base */
31 extern unsigned long vdso64_rt_sigtramp;
32 extern unsigned long vdso32_sigtramp;
33 extern unsigned long vdso32_rt_sigtramp;
34 
35 int vdso_getcpu_init(void);
36 
37 #else /* __ASSEMBLY__ */
38 
39 #ifdef __VDSO64__
40 #define V_FUNCTION_BEGIN(name)		\
41 	.globl name;			\
42 	name:				\
43 
44 #define V_FUNCTION_END(name)		\
45 	.size name,.-name;
46 
47 #define V_LOCAL_FUNC(name) (name)
48 #endif /* __VDSO64__ */
49 
50 #ifdef __VDSO32__
51 
52 #define V_FUNCTION_BEGIN(name)		\
53 	.globl name;			\
54 	.type name,@function; 		\
55 	name:				\
56 
57 #define V_FUNCTION_END(name)		\
58 	.size name,.-name;
59 
60 #define V_LOCAL_FUNC(name) (name)
61 
62 #endif /* __VDSO32__ */
63 
64 #endif /* __ASSEMBLY__ */
65 
66 #endif /* __KERNEL__ */
67 
68 #endif /* __PPC64_VDSO_H__ */
69