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 25b8b572e1SStephen Rothwell #else /* __ASSEMBLY__ */ 26b8b572e1SStephen Rothwell 27b8b572e1SStephen Rothwell #ifdef __VDSO64__ 28b8b572e1SStephen Rothwell #ifdef VDS64_HAS_DESCRIPTORS 29b8b572e1SStephen Rothwell #define V_FUNCTION_BEGIN(name) \ 30b8b572e1SStephen Rothwell .globl name; \ 31b8b572e1SStephen Rothwell .section ".opd","a"; \ 32b8b572e1SStephen Rothwell .align 3; \ 33b8b572e1SStephen Rothwell name: \ 34b8b572e1SStephen Rothwell .quad .name,.TOC.@tocbase,0; \ 35b8b572e1SStephen Rothwell .previous; \ 36b8b572e1SStephen Rothwell .globl .name; \ 37b8b572e1SStephen Rothwell .type .name,@function; \ 38b8b572e1SStephen Rothwell .name: \ 39b8b572e1SStephen Rothwell 40b8b572e1SStephen Rothwell #define V_FUNCTION_END(name) \ 41b8b572e1SStephen Rothwell .size .name,.-.name; 42b8b572e1SStephen Rothwell 43b8b572e1SStephen Rothwell #define V_LOCAL_FUNC(name) (.name) 44b8b572e1SStephen Rothwell 45b8b572e1SStephen Rothwell #else /* VDS64_HAS_DESCRIPTORS */ 46b8b572e1SStephen Rothwell 47b8b572e1SStephen Rothwell #define V_FUNCTION_BEGIN(name) \ 48b8b572e1SStephen Rothwell .globl name; \ 49b8b572e1SStephen Rothwell name: \ 50b8b572e1SStephen Rothwell 51b8b572e1SStephen Rothwell #define V_FUNCTION_END(name) \ 52b8b572e1SStephen Rothwell .size name,.-name; 53b8b572e1SStephen Rothwell 54b8b572e1SStephen Rothwell #define V_LOCAL_FUNC(name) (name) 55b8b572e1SStephen Rothwell 56b8b572e1SStephen Rothwell #endif /* VDS64_HAS_DESCRIPTORS */ 57b8b572e1SStephen Rothwell #endif /* __VDSO64__ */ 58b8b572e1SStephen Rothwell 59b8b572e1SStephen Rothwell #ifdef __VDSO32__ 60b8b572e1SStephen Rothwell 61b8b572e1SStephen Rothwell #define V_FUNCTION_BEGIN(name) \ 62b8b572e1SStephen Rothwell .globl name; \ 63b8b572e1SStephen Rothwell .type name,@function; \ 64b8b572e1SStephen Rothwell name: \ 65b8b572e1SStephen Rothwell 66b8b572e1SStephen Rothwell #define V_FUNCTION_END(name) \ 67b8b572e1SStephen Rothwell .size name,.-name; 68b8b572e1SStephen Rothwell 69b8b572e1SStephen Rothwell #define V_LOCAL_FUNC(name) (name) 70b8b572e1SStephen Rothwell 71b8b572e1SStephen Rothwell #endif /* __VDSO32__ */ 72b8b572e1SStephen Rothwell 73b8b572e1SStephen Rothwell #endif /* __ASSEMBLY__ */ 74b8b572e1SStephen Rothwell 75b8b572e1SStephen Rothwell #endif /* __KERNEL__ */ 76b8b572e1SStephen Rothwell 77b8b572e1SStephen Rothwell #endif /* __PPC64_VDSO_H__ */ 78