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>
This commit is contained in:
Родитель
6846351052
Коммит
91b7bd39e6
|
@ -525,6 +525,7 @@ void set_personality_ia32(bool x32)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(set_personality_ia32);
|
EXPORT_SYMBOL_GPL(set_personality_ia32);
|
||||||
|
|
||||||
|
#ifdef CONFIG_CHECKPOINT_RESTORE
|
||||||
static long prctl_map_vdso(const struct vdso_image *image, unsigned long addr)
|
static long prctl_map_vdso(const struct vdso_image *image, unsigned long addr)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -535,6 +536,7 @@ static long prctl_map_vdso(const struct vdso_image *image, unsigned long addr)
|
||||||
|
|
||||||
return (long)image->size;
|
return (long)image->size;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
long do_arch_prctl(struct task_struct *task, int code, unsigned long addr)
|
long do_arch_prctl(struct task_struct *task, int code, unsigned long addr)
|
||||||
{
|
{
|
||||||
|
@ -590,14 +592,14 @@ long do_arch_prctl(struct task_struct *task, int code, unsigned long addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_CHECKPOINT_RESTORE
|
#ifdef CONFIG_CHECKPOINT_RESTORE
|
||||||
#ifdef CONFIG_X86_X32
|
# ifdef CONFIG_X86_X32
|
||||||
case ARCH_MAP_VDSO_X32:
|
case ARCH_MAP_VDSO_X32:
|
||||||
return prctl_map_vdso(&vdso_image_x32, addr);
|
return prctl_map_vdso(&vdso_image_x32, addr);
|
||||||
#endif
|
# endif
|
||||||
#if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION
|
# if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION
|
||||||
case ARCH_MAP_VDSO_32:
|
case ARCH_MAP_VDSO_32:
|
||||||
return prctl_map_vdso(&vdso_image_32, addr);
|
return prctl_map_vdso(&vdso_image_32, addr);
|
||||||
#endif
|
# endif
|
||||||
case ARCH_MAP_VDSO_64:
|
case ARCH_MAP_VDSO_64:
|
||||||
return prctl_map_vdso(&vdso_image_64, addr);
|
return prctl_map_vdso(&vdso_image_64, addr);
|
||||||
#endif
|
#endif
|
||||||
|
|
Загрузка…
Ссылка в новой задаче