diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-09-15 02:42:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-09-15 02:45:39 -0400 |
commit | 91b7bd39e62e190700aa1398e451a6dfa6d24465 (patch) | |
tree | efda1b5bf2040e8ad376888ba22f57dd1a46bbed /arch/x86 | |
parent | 6846351052e685c2d1428e80ead2d7ca3d7ed913 (diff) |
x86/vdso: Only define prctl_map_vdso() if CONFIG_CHECKPOINT_RESTORE
... otherwise the compiler complains:
arch/x86/kernel/process_64.c:528:13: warning: ‘prctl_map_vdso’ defined but not used [-Wunused-function]
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: gorcunov@openvz.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org
Cc: oleg@redhat.com
Cc: xemul@virtuozzo.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/process_64.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index f240a465920b..b26a0092a01d 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -525,6 +525,7 @@ void set_personality_ia32(bool x32) | |||
525 | } | 525 | } |
526 | EXPORT_SYMBOL_GPL(set_personality_ia32); | 526 | EXPORT_SYMBOL_GPL(set_personality_ia32); |
527 | 527 | ||
528 | #ifdef CONFIG_CHECKPOINT_RESTORE | ||
528 | static long prctl_map_vdso(const struct vdso_image *image, unsigned long addr) | 529 | static long prctl_map_vdso(const struct vdso_image *image, unsigned long addr) |
529 | { | 530 | { |
530 | int ret; | 531 | int ret; |
@@ -535,6 +536,7 @@ static long prctl_map_vdso(const struct vdso_image *image, unsigned long addr) | |||
535 | 536 | ||
536 | return (long)image->size; | 537 | return (long)image->size; |
537 | } | 538 | } |
539 | #endif | ||
538 | 540 | ||
539 | long do_arch_prctl(struct task_struct *task, int code, unsigned long addr) | 541 | long do_arch_prctl(struct task_struct *task, int code, unsigned long addr) |
540 | { | 542 | { |
@@ -590,14 +592,14 @@ long do_arch_prctl(struct task_struct *task, int code, unsigned long addr) | |||
590 | } | 592 | } |
591 | 593 | ||
592 | #ifdef CONFIG_CHECKPOINT_RESTORE | 594 | #ifdef CONFIG_CHECKPOINT_RESTORE |
593 | #ifdef CONFIG_X86_X32 | 595 | # ifdef CONFIG_X86_X32 |
594 | case ARCH_MAP_VDSO_X32: | 596 | case ARCH_MAP_VDSO_X32: |
595 | return prctl_map_vdso(&vdso_image_x32, addr); | 597 | return prctl_map_vdso(&vdso_image_x32, addr); |
596 | #endif | 598 | # endif |
597 | #if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION | 599 | # if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION |
598 | case ARCH_MAP_VDSO_32: | 600 | case ARCH_MAP_VDSO_32: |
599 | return prctl_map_vdso(&vdso_image_32, addr); | 601 | return prctl_map_vdso(&vdso_image_32, addr); |
600 | #endif | 602 | # endif |
601 | case ARCH_MAP_VDSO_64: | 603 | case ARCH_MAP_VDSO_64: |
602 | return prctl_map_vdso(&vdso_image_64, addr); | 604 | return prctl_map_vdso(&vdso_image_64, addr); |
603 | #endif | 605 | #endif |