diff options
Diffstat (limited to 'arch/x86/include/asm/vvar.h')
| -rw-r--r-- | arch/x86/include/asm/vvar.h | 15 | 
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/x86/include/asm/vvar.h b/arch/x86/include/asm/vvar.h index d76ac40da20..5d2b9ad2c6d 100644 --- a/arch/x86/include/asm/vvar.h +++ b/arch/x86/include/asm/vvar.h @@ -16,8 +16,8 @@   * you mess up, the linker will catch it.)   */ -/* Base address of vvars.  This is not ABI. */ -#define VVAR_ADDRESS (-10*1024*1024 - 4096) +#ifndef _ASM_X86_VVAR_H +#define _ASM_X86_VVAR_H  #if defined(__VVAR_KERNEL_LDS) @@ -29,16 +29,17 @@  #else +extern char __vvar_page; +  #define DECLARE_VVAR(offset, type, name)				\ -	static type const * const vvaraddr_ ## name =			\ -		(void *)(VVAR_ADDRESS + (offset)); +	extern type vvar_ ## name __attribute__((visibility("hidden"))); + +#define VVAR(name) (vvar_ ## name)  #define DEFINE_VVAR(type, name)						\  	type name							\  	__attribute__((section(".vvar_" #name), aligned(16))) __visible -#define VVAR(name) (*vvaraddr_ ## name) -  #endif  /* DECLARE_VVAR(offset, type, name) */ @@ -48,3 +49,5 @@ DECLARE_VVAR(16, int, vgetcpu_mode)  DECLARE_VVAR(128, struct vsyscall_gtod_data, vsyscall_gtod_data)  #undef DECLARE_VVAR + +#endif  | 
