1dd3ef10eSGuo Ren /* SPDX-License-Identifier: GPL-2.0 */ 2dd3ef10eSGuo Ren 3dd3ef10eSGuo Ren #ifndef __ASM_CSKY_VDSO_H 4dd3ef10eSGuo Ren #define __ASM_CSKY_VDSO_H 5dd3ef10eSGuo Ren 687f3248cSGuo Ren #include <linux/types.h> 7dd3ef10eSGuo Ren 80d3b051aSGuo Ren #ifndef GENERIC_TIME_VSYSCALL 987f3248cSGuo Ren struct vdso_data { 10dd3ef10eSGuo Ren }; 110d3b051aSGuo Ren #endif 12dd3ef10eSGuo Ren 1387f3248cSGuo Ren /* 1487f3248cSGuo Ren * The VDSO symbols are mapped into Linux so we can just use regular symbol 1587f3248cSGuo Ren * addressing to get their offsets in userspace. The symbols are mapped at an 1687f3248cSGuo Ren * offset of 0, but since the linker must support setting weak undefined 1787f3248cSGuo Ren * symbols to the absolute address 0 it also happens to support other low 1887f3248cSGuo Ren * addresses even when the code model suggests those low addresses would not 19*0b1f557aSJunlin Yang * otherwise be available. 2087f3248cSGuo Ren */ 2187f3248cSGuo Ren #define VDSO_SYMBOL(base, name) \ 2287f3248cSGuo Ren ({ \ 2387f3248cSGuo Ren extern const char __vdso_##name[]; \ 2487f3248cSGuo Ren (void __user *)((unsigned long)(base) + __vdso_##name); \ 2587f3248cSGuo Ren }) 2687f3248cSGuo Ren 27dd3ef10eSGuo Ren #endif /* __ASM_CSKY_VDSO_H */ 28