diff options
-rw-r--r-- | arch/nds32/kernel/vdso.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/nds32/kernel/vdso.c b/arch/nds32/kernel/vdso.c index f1198d7a5654..016f15891f6d 100644 --- a/arch/nds32/kernel/vdso.c +++ b/arch/nds32/kernel/vdso.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <asm/vdso_timer_info.h> | 23 | #include <asm/vdso_timer_info.h> |
24 | #include <asm/cache_info.h> | 24 | #include <asm/cache_info.h> |
25 | extern struct cache_info L1_cache_info[2]; | 25 | extern struct cache_info L1_cache_info[2]; |
26 | extern char vdso_start, vdso_end; | 26 | extern char vdso_start[], vdso_end[]; |
27 | static unsigned long vdso_pages __ro_after_init; | 27 | static unsigned long vdso_pages __ro_after_init; |
28 | static unsigned long timer_mapping_base; | 28 | static unsigned long timer_mapping_base; |
29 | 29 | ||
@@ -66,16 +66,16 @@ static int __init vdso_init(void) | |||
66 | int i; | 66 | int i; |
67 | struct page **vdso_pagelist; | 67 | struct page **vdso_pagelist; |
68 | 68 | ||
69 | if (memcmp(&vdso_start, "\177ELF", 4)) { | 69 | if (memcmp(vdso_start, "\177ELF", 4)) { |
70 | pr_err("vDSO is not a valid ELF object!\n"); | 70 | pr_err("vDSO is not a valid ELF object!\n"); |
71 | return -EINVAL; | 71 | return -EINVAL; |
72 | } | 72 | } |
73 | /* Creat a timer io mapping to get clock cycles counter */ | 73 | /* Creat a timer io mapping to get clock cycles counter */ |
74 | get_timer_node_info(); | 74 | get_timer_node_info(); |
75 | 75 | ||
76 | vdso_pages = (&vdso_end - &vdso_start) >> PAGE_SHIFT; | 76 | vdso_pages = (vdso_end - vdso_start) >> PAGE_SHIFT; |
77 | pr_info("vdso: %ld pages (%ld code @ %p, %ld data @ %p)\n", | 77 | pr_info("vdso: %ld pages (%ld code @ %p, %ld data @ %p)\n", |
78 | vdso_pages + 1, vdso_pages, &vdso_start, 1L, vdso_data); | 78 | vdso_pages + 1, vdso_pages, vdso_start, 1L, vdso_data); |
79 | 79 | ||
80 | /* Allocate the vDSO pagelist */ | 80 | /* Allocate the vDSO pagelist */ |
81 | vdso_pagelist = kcalloc(vdso_pages, sizeof(struct page *), GFP_KERNEL); | 81 | vdso_pagelist = kcalloc(vdso_pages, sizeof(struct page *), GFP_KERNEL); |
@@ -83,7 +83,7 @@ static int __init vdso_init(void) | |||
83 | return -ENOMEM; | 83 | return -ENOMEM; |
84 | 84 | ||
85 | for (i = 0; i < vdso_pages; i++) | 85 | for (i = 0; i < vdso_pages; i++) |
86 | vdso_pagelist[i] = virt_to_page(&vdso_start + i * PAGE_SIZE); | 86 | vdso_pagelist[i] = virt_to_page(vdso_start + i * PAGE_SIZE); |
87 | vdso_spec[1].pages = &vdso_pagelist[0]; | 87 | vdso_spec[1].pages = &vdso_pagelist[0]; |
88 | 88 | ||
89 | return 0; | 89 | return 0; |