aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/vdso.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/vdso.c')
-rw-r--r--arch/s390/kernel/vdso.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c
index 0bbb7e027c5a..0d58269ff425 100644
--- a/arch/s390/kernel/vdso.c
+++ b/arch/s390/kernel/vdso.c
@@ -32,19 +32,17 @@
32#include <asm/vdso.h> 32#include <asm/vdso.h>
33#include <asm/facility.h> 33#include <asm/facility.h>
34 34
35#if defined(CONFIG_32BIT) || defined(CONFIG_COMPAT) 35#ifdef CONFIG_COMPAT
36extern char vdso32_start, vdso32_end; 36extern char vdso32_start, vdso32_end;
37static void *vdso32_kbase = &vdso32_start; 37static void *vdso32_kbase = &vdso32_start;
38static unsigned int vdso32_pages; 38static unsigned int vdso32_pages;
39static struct page **vdso32_pagelist; 39static struct page **vdso32_pagelist;
40#endif 40#endif
41 41
42#ifdef CONFIG_64BIT
43extern char vdso64_start, vdso64_end; 42extern char vdso64_start, vdso64_end;
44static void *vdso64_kbase = &vdso64_start; 43static void *vdso64_kbase = &vdso64_start;
45static unsigned int vdso64_pages; 44static unsigned int vdso64_pages;
46static struct page **vdso64_pagelist; 45static struct page **vdso64_pagelist;
47#endif /* CONFIG_64BIT */
48 46
49/* 47/*
50 * Should the kernel map a VDSO page into processes and pass its 48 * Should the kernel map a VDSO page into processes and pass its
@@ -87,7 +85,6 @@ static void vdso_init_data(struct vdso_data *vd)
87 vd->ectg_available = test_facility(31); 85 vd->ectg_available = test_facility(31);
88} 86}
89 87
90#ifdef CONFIG_64BIT
91/* 88/*
92 * Allocate/free per cpu vdso data. 89 * Allocate/free per cpu vdso data.
93 */ 90 */
@@ -169,7 +166,6 @@ static void vdso_init_cr5(void)
169 cr5 = offsetof(struct _lowcore, paste); 166 cr5 = offsetof(struct _lowcore, paste);
170 __ctl_load(cr5, 5, 5); 167 __ctl_load(cr5, 5, 5);
171} 168}
172#endif /* CONFIG_64BIT */
173 169
174/* 170/*
175 * This is called from binfmt_elf, we create the special vma for the 171 * This is called from binfmt_elf, we create the special vma for the
@@ -191,7 +187,6 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
191 if (!uses_interp) 187 if (!uses_interp)
192 return 0; 188 return 0;
193 189
194#ifdef CONFIG_64BIT
195 vdso_pagelist = vdso64_pagelist; 190 vdso_pagelist = vdso64_pagelist;
196 vdso_pages = vdso64_pages; 191 vdso_pages = vdso64_pages;
197#ifdef CONFIG_COMPAT 192#ifdef CONFIG_COMPAT
@@ -200,11 +195,6 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
200 vdso_pages = vdso32_pages; 195 vdso_pages = vdso32_pages;
201 } 196 }
202#endif 197#endif
203#else
204 vdso_pagelist = vdso32_pagelist;
205 vdso_pages = vdso32_pages;
206#endif
207
208 /* 198 /*
209 * vDSO has a problem and was disabled, just don't "enable" it for 199 * vDSO has a problem and was disabled, just don't "enable" it for
210 * the process 200 * the process
@@ -268,7 +258,7 @@ static int __init vdso_init(void)
268 if (!vdso_enabled) 258 if (!vdso_enabled)
269 return 0; 259 return 0;
270 vdso_init_data(vdso_data); 260 vdso_init_data(vdso_data);
271#if defined(CONFIG_32BIT) || defined(CONFIG_COMPAT) 261#ifdef CONFIG_COMPAT
272 /* Calculate the size of the 32 bit vDSO */ 262 /* Calculate the size of the 32 bit vDSO */
273 vdso32_pages = ((&vdso32_end - &vdso32_start 263 vdso32_pages = ((&vdso32_end - &vdso32_start
274 + PAGE_SIZE - 1) >> PAGE_SHIFT) + 1; 264 + PAGE_SIZE - 1) >> PAGE_SHIFT) + 1;
@@ -287,7 +277,6 @@ static int __init vdso_init(void)
287 vdso32_pagelist[vdso32_pages] = NULL; 277 vdso32_pagelist[vdso32_pages] = NULL;
288#endif 278#endif
289 279
290#ifdef CONFIG_64BIT
291 /* Calculate the size of the 64 bit vDSO */ 280 /* Calculate the size of the 64 bit vDSO */
292 vdso64_pages = ((&vdso64_end - &vdso64_start 281 vdso64_pages = ((&vdso64_end - &vdso64_start
293 + PAGE_SIZE - 1) >> PAGE_SHIFT) + 1; 282 + PAGE_SIZE - 1) >> PAGE_SHIFT) + 1;
@@ -307,7 +296,6 @@ static int __init vdso_init(void)
307 if (vdso_alloc_per_cpu(&S390_lowcore)) 296 if (vdso_alloc_per_cpu(&S390_lowcore))
308 BUG(); 297 BUG();
309 vdso_init_cr5(); 298 vdso_init_cr5();
310#endif /* CONFIG_64BIT */
311 299
312 get_page(virt_to_page(vdso_data)); 300 get_page(virt_to_page(vdso_data));
313 301