xref: /openbmc/linux/arch/powerpc/include/asm/vdso.h (revision 8a8f7866)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2*65d2150cSChristophe Leroy #ifndef _ASM_POWERPC_VDSO_H
3*65d2150cSChristophe Leroy #define _ASM_POWERPC_VDSO_H
4b8b572e1SStephen Rothwell 
5b8b572e1SStephen Rothwell #define VDSO_VERSION_STRING	LINUX_2.6.15
6b8b572e1SStephen Rothwell 
7b8b572e1SStephen Rothwell #ifndef __ASSEMBLY__
8b8b572e1SStephen Rothwell 
991bf6955SChristophe Leroy #ifdef CONFIG_PPC64
1091bf6955SChristophe Leroy #include <generated/vdso64-offsets.h>
1191bf6955SChristophe Leroy #endif
1291bf6955SChristophe Leroy 
1391bf6955SChristophe Leroy #ifdef CONFIG_VDSO32
1491bf6955SChristophe Leroy #include <generated/vdso32-offsets.h>
1591bf6955SChristophe Leroy #endif
1691bf6955SChristophe Leroy 
1791bf6955SChristophe Leroy #define VDSO64_SYMBOL(base, name) ((unsigned long)(base) + (vdso64_offset_##name))
1891bf6955SChristophe Leroy 
1991bf6955SChristophe Leroy #define VDSO32_SYMBOL(base, name) ((unsigned long)(base) + (vdso32_offset_##name))
2091bf6955SChristophe Leroy 
21061d19f2SPaul Gortmaker int vdso_getcpu_init(void);
2218ad51ddSAnton Blanchard 
23b8b572e1SStephen Rothwell #else /* __ASSEMBLY__ */
24b8b572e1SStephen Rothwell 
25b8b572e1SStephen Rothwell #ifdef __VDSO64__
26b8b572e1SStephen Rothwell #define V_FUNCTION_BEGIN(name)		\
27b8b572e1SStephen Rothwell 	.globl name;			\
28b8b572e1SStephen Rothwell 	name:				\
29b8b572e1SStephen Rothwell 
30b8b572e1SStephen Rothwell #define V_FUNCTION_END(name)		\
31b8b572e1SStephen Rothwell 	.size name,.-name;
32b8b572e1SStephen Rothwell 
33b8b572e1SStephen Rothwell #define V_LOCAL_FUNC(name) (name)
34b8b572e1SStephen Rothwell #endif /* __VDSO64__ */
35b8b572e1SStephen Rothwell 
36b8b572e1SStephen Rothwell #ifdef __VDSO32__
37b8b572e1SStephen Rothwell 
38b8b572e1SStephen Rothwell #define V_FUNCTION_BEGIN(name)		\
39b8b572e1SStephen Rothwell 	.globl name;			\
40b8b572e1SStephen Rothwell 	.type name,@function; 		\
41b8b572e1SStephen Rothwell 	name:				\
42b8b572e1SStephen Rothwell 
43b8b572e1SStephen Rothwell #define V_FUNCTION_END(name)		\
44b8b572e1SStephen Rothwell 	.size name,.-name;
45b8b572e1SStephen Rothwell 
46b8b572e1SStephen Rothwell #define V_LOCAL_FUNC(name) (name)
47b8b572e1SStephen Rothwell 
48b8b572e1SStephen Rothwell #endif /* __VDSO32__ */
49b8b572e1SStephen Rothwell 
50b8b572e1SStephen Rothwell #endif /* __ASSEMBLY__ */
51b8b572e1SStephen Rothwell 
52*65d2150cSChristophe Leroy #endif /* _ASM_POWERPC_VDSO_H */
53