diff options
-rw-r--r-- | arch/x86/kernel/setup_64.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/vsyscall_64.c | 3 | ||||
-rw-r--r-- | include/asm-x86/vsyscall.h | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c index bc7758ea06af..8618178db842 100644 --- a/arch/x86/kernel/setup_64.c +++ b/arch/x86/kernel/setup_64.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <asm/mtrr.h> | 45 | #include <asm/mtrr.h> |
46 | #include <asm/uaccess.h> | 46 | #include <asm/uaccess.h> |
47 | #include <asm/system.h> | 47 | #include <asm/system.h> |
48 | #include <asm/vsyscall.h> | ||
48 | #include <asm/io.h> | 49 | #include <asm/io.h> |
49 | #include <asm/smp.h> | 50 | #include <asm/smp.h> |
50 | #include <asm/msr.h> | 51 | #include <asm/msr.h> |
@@ -453,6 +454,7 @@ void __init setup_arch(char **cmdline_p) | |||
453 | #endif | 454 | #endif |
454 | reserve_crashkernel(); | 455 | reserve_crashkernel(); |
455 | paging_init(); | 456 | paging_init(); |
457 | map_vsyscall(); | ||
456 | 458 | ||
457 | early_quirks(); | 459 | early_quirks(); |
458 | 460 | ||
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c index e5c1118a8098..3f8242774580 100644 --- a/arch/x86/kernel/vsyscall_64.c +++ b/arch/x86/kernel/vsyscall_64.c | |||
@@ -319,7 +319,7 @@ cpu_vsyscall_notifier(struct notifier_block *n, unsigned long action, void *arg) | |||
319 | return NOTIFY_DONE; | 319 | return NOTIFY_DONE; |
320 | } | 320 | } |
321 | 321 | ||
322 | static void __init map_vsyscall(void) | 322 | void __init map_vsyscall(void) |
323 | { | 323 | { |
324 | extern char __vsyscall_0; | 324 | extern char __vsyscall_0; |
325 | unsigned long physaddr_page0 = __pa_symbol(&__vsyscall_0); | 325 | unsigned long physaddr_page0 = __pa_symbol(&__vsyscall_0); |
@@ -335,7 +335,6 @@ static int __init vsyscall_init(void) | |||
335 | BUG_ON((unsigned long) &vtime != VSYSCALL_ADDR(__NR_vtime)); | 335 | BUG_ON((unsigned long) &vtime != VSYSCALL_ADDR(__NR_vtime)); |
336 | BUG_ON((VSYSCALL_ADDR(0) != __fix_to_virt(VSYSCALL_FIRST_PAGE))); | 336 | BUG_ON((VSYSCALL_ADDR(0) != __fix_to_virt(VSYSCALL_FIRST_PAGE))); |
337 | BUG_ON((unsigned long) &vgetcpu != VSYSCALL_ADDR(__NR_vgetcpu)); | 337 | BUG_ON((unsigned long) &vgetcpu != VSYSCALL_ADDR(__NR_vgetcpu)); |
338 | map_vsyscall(); | ||
339 | #ifdef CONFIG_SYSCTL | 338 | #ifdef CONFIG_SYSCTL |
340 | register_sysctl_table(kernel_root_table2); | 339 | register_sysctl_table(kernel_root_table2); |
341 | #endif | 340 | #endif |
diff --git a/include/asm-x86/vsyscall.h b/include/asm-x86/vsyscall.h index f01c49f5d108..17b3700949bf 100644 --- a/include/asm-x86/vsyscall.h +++ b/include/asm-x86/vsyscall.h | |||
@@ -36,6 +36,8 @@ extern volatile unsigned long __jiffies; | |||
36 | extern int vgetcpu_mode; | 36 | extern int vgetcpu_mode; |
37 | extern struct timezone sys_tz; | 37 | extern struct timezone sys_tz; |
38 | 38 | ||
39 | extern void map_vsyscall(void); | ||
40 | |||
39 | #endif /* __KERNEL__ */ | 41 | #endif /* __KERNEL__ */ |
40 | 42 | ||
41 | #endif /* _ASM_X86_64_VSYSCALL_H_ */ | 43 | #endif /* _ASM_X86_64_VSYSCALL_H_ */ |