1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __S390_VDSO_H__ 3 #define __S390_VDSO_H__ 4 5 #include <vdso/datapage.h> 6 7 /* Default link addresses for the vDSOs */ 8 #define VDSO32_LBASE 0 9 #define VDSO64_LBASE 0 10 11 #define VDSO_VERSION_STRING LINUX_2.6.29 12 13 #ifndef __ASSEMBLY__ 14 15 /* 16 * Note about the vdso_data and vdso_per_cpu_data structures: 17 * 18 * NEVER USE THEM IN USERSPACE CODE DIRECTLY. The layout of the 19 * structure is supposed to be known only to the function in the vdso 20 * itself and may change without notice. 21 */ 22 23 struct vdso_per_cpu_data { 24 /* 25 * Note: node_id and cpu_nr must be at adjacent memory locations. 26 * VDSO userspace must read both values with a single instruction. 27 */ 28 union { 29 __u64 getcpu_val; 30 struct { 31 __u32 node_id; 32 __u32 cpu_nr; 33 }; 34 }; 35 }; 36 37 extern struct vdso_data *vdso_data; 38 39 int vdso_alloc_per_cpu(struct lowcore *lowcore); 40 void vdso_free_per_cpu(struct lowcore *lowcore); 41 42 #endif /* __ASSEMBLY__ */ 43 #endif /* __S390_VDSO_H__ */ 44