aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/include/asm/vdso.h2
-rw-r--r--arch/arm/kernel/vdso.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm/include/asm/vdso.h b/arch/arm/include/asm/vdso.h
index 9c99e817535e..5b85889f82ee 100644
--- a/arch/arm/include/asm/vdso.h
+++ b/arch/arm/include/asm/vdso.h
@@ -12,8 +12,6 @@ struct mm_struct;
12 12
13void arm_install_vdso(struct mm_struct *mm, unsigned long addr); 13void arm_install_vdso(struct mm_struct *mm, unsigned long addr);
14 14
15extern char vdso_start, vdso_end;
16
17extern unsigned int vdso_total_pages; 15extern unsigned int vdso_total_pages;
18 16
19#else /* CONFIG_VDSO */ 17#else /* CONFIG_VDSO */
diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c
index a4d6dc0f2427..f4dd7f9663c1 100644
--- a/arch/arm/kernel/vdso.c
+++ b/arch/arm/kernel/vdso.c
@@ -39,6 +39,8 @@
39 39
40static struct page **vdso_text_pagelist; 40static struct page **vdso_text_pagelist;
41 41
42extern char vdso_start[], vdso_end[];
43
42/* Total number of pages needed for the data and text portions of the VDSO. */ 44/* Total number of pages needed for the data and text portions of the VDSO. */
43unsigned int vdso_total_pages __ro_after_init; 45unsigned int vdso_total_pages __ro_after_init;
44 46
@@ -197,13 +199,13 @@ static int __init vdso_init(void)
197 unsigned int text_pages; 199 unsigned int text_pages;
198 int i; 200 int i;
199 201
200 if (memcmp(&vdso_start, "\177ELF", 4)) { 202 if (memcmp(vdso_start, "\177ELF", 4)) {
201 pr_err("VDSO is not a valid ELF object!\n"); 203 pr_err("VDSO is not a valid ELF object!\n");
202 return -ENOEXEC; 204 return -ENOEXEC;
203 } 205 }
204 206
205 text_pages = (&vdso_end - &vdso_start) >> PAGE_SHIFT; 207 text_pages = (vdso_end - vdso_start) >> PAGE_SHIFT;
206 pr_debug("vdso: %i text pages at base %p\n", text_pages, &vdso_start); 208 pr_debug("vdso: %i text pages at base %p\n", text_pages, vdso_start);
207 209
208 /* Allocate the VDSO text pagelist */ 210 /* Allocate the VDSO text pagelist */
209 vdso_text_pagelist = kcalloc(text_pages, sizeof(struct page *), 211 vdso_text_pagelist = kcalloc(text_pages, sizeof(struct page *),
@@ -218,7 +220,7 @@ static int __init vdso_init(void)
218 for (i = 0; i < text_pages; i++) { 220 for (i = 0; i < text_pages; i++) {
219 struct page *page; 221 struct page *page;
220 222
221 page = virt_to_page(&vdso_start + i * PAGE_SIZE); 223 page = virt_to_page(vdso_start + i * PAGE_SIZE);
222 vdso_text_pagelist[i] = page; 224 vdso_text_pagelist[i] = page;
223 } 225 }
224 226
@@ -229,7 +231,7 @@ static int __init vdso_init(void)
229 231
230 cntvct_ok = cntvct_functional(); 232 cntvct_ok = cntvct_functional();
231 233
232 patch_vdso(&vdso_start); 234 patch_vdso(vdso_start);
233 235
234 return 0; 236 return 0;
235} 237}