summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2020-09-27 09:16:33 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2020-12-04 01:01:17 +1100
commit91bf695596f594e42d69d70deb2ae53cafecf77c (patch)
treef227a7426c8e357087db461585f0d48b2969f6fb /arch/powerpc/include/asm
parent550e6074c106e1a6fb57dfef62f0daede12d832c (diff)
downloadlinux-91bf695596f594e42d69d70deb2ae53cafecf77c.tar.gz
linux-91bf695596f594e42d69d70deb2ae53cafecf77c.tar.bz2
linux-91bf695596f594e42d69d70deb2ae53cafecf77c.zip
powerpc/vdso: Retrieve sigtramp offsets at buildtime
This is copied from arm64. Instead of using runtime generated signal trampoline offsets, get offsets at buildtime. If the said trampoline doesn't exist, build will fail. So no need to check whether the trampoline exists or not in the VDSO. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/f8bfd6812c3e3678b1cdb4d55a52f9eb022b40d3.1601197618.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r--arch/powerpc/include/asm/vdso.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/vdso.h b/arch/powerpc/include/asm/vdso.h
index 2ff884853f97..f5257b7f17d0 100644
--- a/arch/powerpc/include/asm/vdso.h
+++ b/arch/powerpc/include/asm/vdso.h
@@ -15,6 +15,18 @@
#ifndef __ASSEMBLY__
+#ifdef CONFIG_PPC64
+#include <generated/vdso64-offsets.h>
+#endif
+
+#ifdef CONFIG_VDSO32
+#include <generated/vdso32-offsets.h>
+#endif
+
+#define VDSO64_SYMBOL(base, name) ((unsigned long)(base) + (vdso64_offset_##name))
+
+#define VDSO32_SYMBOL(base, name) ((unsigned long)(base) + (vdso32_offset_##name))
+
/* Offsets relative to thread->vdso_base */
extern unsigned long vdso64_rt_sigtramp;
extern unsigned long vdso32_sigtramp;