summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/vdso-symbols.h
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2024-09-13 15:05:42 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2024-09-13 17:28:36 +0200
commitc1ae1b4ef5bf541c71ced84d087abed029f13b1a (patch)
tree2f1897ce1e90a4ad2b4d2e591e40c8cb8ab9d1a9 /arch/s390/include/asm/vdso-symbols.h
parente10863fffe3a377a828f876a39cc1c47567b556f (diff)
s390/vdso: Move vdso symbol handling to separate header file
The vdso.h header file, which is included at many places, includes generated header files. This can easily lead to recursive header file inclusions if the vdso code is changed. Therefore move the vdso symbol code, which requires the generated header files, to a separate header file, and include it at the two locations which require it. Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'arch/s390/include/asm/vdso-symbols.h')
-rw-r--r--arch/s390/include/asm/vdso-symbols.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/s390/include/asm/vdso-symbols.h b/arch/s390/include/asm/vdso-symbols.h
new file mode 100644
index 000000000000..0df17574d788
--- /dev/null
+++ b/arch/s390/include/asm/vdso-symbols.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __S390_VDSO_SYMBOLS_H__
+#define __S390_VDSO_SYMBOLS_H__
+
+#include <generated/vdso64-offsets.h>
+#ifdef CONFIG_COMPAT
+#include <generated/vdso32-offsets.h>
+#endif
+
+#define VDSO64_SYMBOL(tsk, name) ((tsk)->mm->context.vdso_base + (vdso64_offset_##name))
+#ifdef CONFIG_COMPAT
+#define VDSO32_SYMBOL(tsk, name) ((tsk)->mm->context.vdso_base + (vdso32_offset_##name))
+#else
+#define VDSO32_SYMBOL(tsk, name) (-1UL)
+#endif
+
+#endif /* __S390_VDSO_SYMBOLS_H__ */