1b8b572e1SStephen Rothwell #ifndef __PPC64_VDSO_H__ 2b8b572e1SStephen Rothwell #define __PPC64_VDSO_H__ 3b8b572e1SStephen Rothwell 4b8b572e1SStephen Rothwell #ifdef __KERNEL__ 5b8b572e1SStephen Rothwell 6b8b572e1SStephen Rothwell /* Default link addresses for the vDSOs */ 7b8b572e1SStephen Rothwell #define VDSO32_LBASE 0x100000 8b8b572e1SStephen Rothwell #define VDSO64_LBASE 0x100000 9b8b572e1SStephen Rothwell 1030d0b368SAnton Blanchard /* Default map addresses for 32bit vDSO */ 11b8b572e1SStephen Rothwell #define VDSO32_MBASE VDSO32_LBASE 12b8b572e1SStephen Rothwell 13b8b572e1SStephen Rothwell #define VDSO_VERSION_STRING LINUX_2.6.15 14b8b572e1SStephen Rothwell 15b8b572e1SStephen Rothwell /* Define if 64 bits VDSO has procedure descriptors */ 16b8b572e1SStephen Rothwell #undef VDS64_HAS_DESCRIPTORS 17b8b572e1SStephen Rothwell 18b8b572e1SStephen Rothwell #ifndef __ASSEMBLY__ 19b8b572e1SStephen Rothwell 20b8b572e1SStephen Rothwell /* Offsets relative to thread->vdso_base */ 21b8b572e1SStephen Rothwell extern unsigned long vdso64_rt_sigtramp; 22b8b572e1SStephen Rothwell extern unsigned long vdso32_sigtramp; 23b8b572e1SStephen Rothwell extern unsigned long vdso32_rt_sigtramp; 24b8b572e1SStephen Rothwell 25061d19f2SPaul Gortmaker int vdso_getcpu_init(void); 2618ad51ddSAnton Blanchard 27b8b572e1SStephen Rothwell #else /* __ASSEMBLY__ */ 28b8b572e1SStephen Rothwell 29b8b572e1SStephen Rothwell #ifdef __VDSO64__ 30b8b572e1SStephen Rothwell #ifdef VDS64_HAS_DESCRIPTORS 31b8b572e1SStephen Rothwell #define V_FUNCTION_BEGIN(name) \ 32b8b572e1SStephen Rothwell .globl name; \ 33b8b572e1SStephen Rothwell .section ".opd","a"; \ 34b8b572e1SStephen Rothwell .align 3; \ 35b8b572e1SStephen Rothwell name: \ 36b8b572e1SStephen Rothwell .quad .name,.TOC.@tocbase,0; \ 37b8b572e1SStephen Rothwell .previous; \ 38b8b572e1SStephen Rothwell .globl .name; \ 39b8b572e1SStephen Rothwell .type .name,@function; \ 40b8b572e1SStephen Rothwell .name: \ 41b8b572e1SStephen Rothwell 42b8b572e1SStephen Rothwell #define V_FUNCTION_END(name) \ 43b8b572e1SStephen Rothwell .size .name,.-.name; 44b8b572e1SStephen Rothwell 45b8b572e1SStephen Rothwell #define V_LOCAL_FUNC(name) (.name) 46b8b572e1SStephen Rothwell 47b8b572e1SStephen Rothwell #else /* VDS64_HAS_DESCRIPTORS */ 48b8b572e1SStephen Rothwell 49b8b572e1SStephen Rothwell #define V_FUNCTION_BEGIN(name) \ 50b8b572e1SStephen Rothwell .globl name; \ 51b8b572e1SStephen Rothwell name: \ 52b8b572e1SStephen Rothwell 53b8b572e1SStephen Rothwell #define V_FUNCTION_END(name) \ 54b8b572e1SStephen Rothwell .size name,.-name; 55b8b572e1SStephen Rothwell 56b8b572e1SStephen Rothwell #define V_LOCAL_FUNC(name) (name) 57b8b572e1SStephen Rothwell 58b8b572e1SStephen Rothwell #endif /* VDS64_HAS_DESCRIPTORS */ 59b8b572e1SStephen Rothwell #endif /* __VDSO64__ */ 60b8b572e1SStephen Rothwell 61b8b572e1SStephen Rothwell #ifdef __VDSO32__ 62b8b572e1SStephen Rothwell 63b8b572e1SStephen Rothwell #define V_FUNCTION_BEGIN(name) \ 64b8b572e1SStephen Rothwell .globl name; \ 65b8b572e1SStephen Rothwell .type name,@function; \ 66b8b572e1SStephen Rothwell name: \ 67b8b572e1SStephen Rothwell 68b8b572e1SStephen Rothwell #define V_FUNCTION_END(name) \ 69b8b572e1SStephen Rothwell .size name,.-name; 70b8b572e1SStephen Rothwell 71b8b572e1SStephen Rothwell #define V_LOCAL_FUNC(name) (name) 72b8b572e1SStephen Rothwell 73b8b572e1SStephen Rothwell #endif /* __VDSO32__ */ 74b8b572e1SStephen Rothwell 75b8b572e1SStephen Rothwell #endif /* __ASSEMBLY__ */ 76b8b572e1SStephen Rothwell 77b8b572e1SStephen Rothwell #endif /* __KERNEL__ */ 78b8b572e1SStephen Rothwell 79b8b572e1SStephen Rothwell #endif /* __PPC64_VDSO_H__ */ 80