aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorStefani Seibold <stefani@seibold.net>2014-03-17 18:22:07 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2014-03-18 15:52:29 -0400
commitef721987aef0cc0abba08c88810f2155f76b0b1f (patch)
treed0e0086b61125be1fabac05a61408dc22ea8b7c0 /arch
parent0df1ea2b7955d3cb311a549c44ed482452b859ff (diff)
x86, vdso: Introduce VVAR marco for vdso32
This patch revamps the vvar.h for introduce the VVAR macro for vdso32. Reviewed-by: Andy Lutomirski <luto@amacapital.net> Signed-off-by: Stefani Seibold <stefani@seibold.net> Link: http://lkml.kernel.org/r/1395094933-14252-8-git-send-email-stefani@seibold.net Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/vvar.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/x86/include/asm/vvar.h b/arch/x86/include/asm/vvar.h
index 0a534eac5f56..52c79ffc3161 100644
--- a/arch/x86/include/asm/vvar.h
+++ b/arch/x86/include/asm/vvar.h
@@ -26,6 +26,15 @@
26 26
27#else 27#else
28 28
29#ifdef BUILD_VDSO32
30
31#define DECLARE_VVAR(offset, type, name) \
32 extern type vvar_ ## name __attribute__((visibility("hidden")));
33
34#define VVAR(name) (vvar_ ## name)
35
36#else
37
29extern char __vvar_page; 38extern char __vvar_page;
30 39
31/* Base address of vvars. This is not ABI. */ 40/* Base address of vvars. This is not ABI. */
@@ -39,12 +48,13 @@ extern char __vvar_page;
39 static type const * const vvaraddr_ ## name = \ 48 static type const * const vvaraddr_ ## name = \
40 (void *)(VVAR_ADDRESS + (offset)); 49 (void *)(VVAR_ADDRESS + (offset));
41 50
51#define VVAR(name) (*vvaraddr_ ## name)
52#endif
53
42#define DEFINE_VVAR(type, name) \ 54#define DEFINE_VVAR(type, name) \
43 type name \ 55 type name \
44 __attribute__((section(".vvar_" #name), aligned(16))) __visible 56 __attribute__((section(".vvar_" #name), aligned(16))) __visible
45 57
46#define VVAR(name) (*vvaraddr_ ## name)
47
48#endif 58#endif
49 59
50/* DECLARE_VVAR(offset, type, name) */ 60/* DECLARE_VVAR(offset, type, name) */