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