[PATCH v1 4/6] powerpc/vdso: Initialise vdso32_kbase at compile time

From: Christophe Leroy
Date: Thu Aug 27 2020 - 11:49:39 EST


Initialise vdso32_kbase at compile time like vdso64_kbase.

Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
---
arch/powerpc/kernel/vdso.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index c173c70ca7d2..6390a37dacea 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -37,13 +37,12 @@
/* The alignment of the vDSO */
#define VDSO_ALIGNMENT (1 << 16)

+extern char vdso32_start, vdso32_end;
static unsigned int vdso32_pages;
-static void *vdso32_kbase;
+static void *vdso32_kbase = &vdso32_start;
unsigned long vdso32_sigtramp;
unsigned long vdso32_rt_sigtramp;

-extern char vdso32_start, vdso32_end;
-
extern char vdso64_start, vdso64_end;
static void *vdso64_kbase = &vdso64_start;
static unsigned int vdso64_pages;
@@ -691,8 +690,6 @@ static int __init vdso_init(void)
*/
vdso64_pages = (&vdso64_end - &vdso64_start) >> PAGE_SHIFT;

- vdso32_kbase = &vdso32_start;
-
/*
* Calculate the size of the 32 bits vDSO
*/
--
2.25.0