From 9e6f450f946d35d585798da268d45c679632fe05 Mon Sep 17 00:00:00 2001 From: Andy Lutomirski Date: Thu, 20 Mar 2014 18:57:18 -0700 Subject: x86, vdso: Move more vdso definitions into vdso.h This fixes the Xen build and gets rid of a silly header file. Signed-off-by: Andy Lutomirski Cc: Stefani Seibold Link: http://lkml.kernel.org/r/1df77311795aff75f5742c787d277518314a38d3.1395366931.git.luto@amacapital.net Signed-off-by: H. Peter Anvin --- arch/x86/include/asm/vdso.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'arch/x86/include/asm/vdso.h') diff --git a/arch/x86/include/asm/vdso.h b/arch/x86/include/asm/vdso.h index 0301d78bb910..7622a65a969e 100644 --- a/arch/x86/include/asm/vdso.h +++ b/arch/x86/include/asm/vdso.h @@ -1,10 +1,46 @@ #ifndef _ASM_X86_VDSO_H #define _ASM_X86_VDSO_H +#include +#include + +#ifdef __ASSEMBLER__ + +#define DEFINE_VDSO_IMAGE(symname, filename) \ +__PAGE_ALIGNED_DATA ; \ + .globl symname##_start, symname##_end ; \ + .align PAGE_SIZE ; \ + symname##_start: ; \ + .incbin filename ; \ + symname##_end: ; \ + .align PAGE_SIZE /* extra data here leaks to userspace. */ ; \ + \ +.previous ; \ + \ + .globl symname##_pages ; \ + .bss ; \ + .align 8 ; \ + .type symname##_pages, @object ; \ + symname##_pages: ; \ + .zero (symname##_end - symname##_start + PAGE_SIZE - 1) / PAGE_SIZE * (BITS_PER_LONG / 8) ; \ + .size symname##_pages, .-symname##_pages + +#else + +#define DECLARE_VDSO_IMAGE(symname) \ + extern char symname##_start[], symname##_end[]; \ + extern struct page *symname##_pages[] + #if defined CONFIG_X86_32 || defined CONFIG_COMPAT #include +DECLARE_VDSO_IMAGE(vdso32_int80); +#ifdef CONFIG_COMPAT +DECLARE_VDSO_IMAGE(vdso32_syscall); +#endif +DECLARE_VDSO_IMAGE(vdso32_sysenter); + extern const char VDSO32_PRELINK[]; /* @@ -27,4 +63,6 @@ extern void __user __kernel_rt_sigreturn; void __init patch_vdso32(void *vdso, size_t len); +#endif /* __ASSEMBLER__ */ + #endif /* _ASM_X86_VDSO_H */ -- cgit