mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: stefani@seibold.net
To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	x86@kernel.org, tglx@linutronix.de, mingo@redhat.com,
	hpa@zytor.com, ak@linux.intel.com, aarcange@redhat.com,
	john.stultz@linaro.org, luto@amacapital.net, xemul@parallels.com,
	gorcunov@openvz.org, andriy.shevchenko@linux.intel.com
Cc: Martin.Runge@rohde-schwarz.com, Andreas.Brief@rohde-schwarz.com,
	Stefani Seibold <stefani@seibold.net>
Subject: [PATCH v12 7/9] introduce VVAR marco for vdso32
Date: Wed,  5 Feb 2014 09:20:02 +0100	[thread overview]
Message-ID: <1391588404-28147-8-git-send-email-stefani@seibold.net> (raw)
In-Reply-To: <1391588404-28147-1-git-send-email-stefani@seibold.net>

From: Stefani Seibold <stefani@seibold.net>

This patch revamp the vvar.h for introduce the VVAR macro for vdso32.

Signed-off-by: Stefani Seibold <stefani@seibold.net>
---
 arch/x86/include/asm/vvar.h | 32 +++++++++++++++++++++-----------
 1 file changed, 21 insertions(+), 11 deletions(-)

diff --git a/arch/x86/include/asm/vvar.h b/arch/x86/include/asm/vvar.h
index 7cd69af..bf13dc5 100644
--- a/arch/x86/include/asm/vvar.h
+++ b/arch/x86/include/asm/vvar.h
@@ -16,15 +16,6 @@
  * you mess up, the linker will catch it.)
  */
 
-/* Base address of vvars.  This is not ABI. */
-#ifdef CONFIG_X86_64
-#define VVAR_ADDRESS (-10*1024*1024 - 4096)
-#else
-extern char __vvar_page;
-
-#define VVAR_ADDRESS (&__vvar_page)
-#endif
-
 #if defined(__VVAR_KERNEL_LDS)
 
 /* The kernel linker script defines its own magic to put vvars in the
@@ -35,16 +26,35 @@ extern char __vvar_page;
 
 #else
 
+#ifdef BUILD_VDSO32
+
+#define DECLARE_VVAR(offset, type, name)				\
+	extern type vvar_ ## name __attribute__((visibility("hidden")));
+
+#define VVAR(name) (vvar_ ## name)
+
+#else
+
+/* Base address of vvars.  This is not ABI. */
+#ifdef CONFIG_X86_64
+#define VVAR_ADDRESS (-10*1024*1024 - 4096)
+#else
+extern char __vvar_page;
+
+#define VVAR_ADDRESS (&__vvar_page)
+#endif
+
 #define DECLARE_VVAR(offset, type, name)				\
 	static type const * const vvaraddr_ ## name =			\
 		(void *)(VVAR_ADDRESS + (offset));
 
+#define VVAR(name) (*vvaraddr_ ## name)
+#endif
+
 #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) */
-- 
1.8.5.3


  parent reply	other threads:[~2014-02-05  8:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-05  8:19 [PATCH v12 0/9] Add 32 bit VDSO time function support stefani
2014-02-05  8:19 ` [PATCH v12 1/9] Make vsyscall_gtod_data handling x86 generic stefani
2014-02-05  8:19 ` [PATCH v12 2/9] Add new func _install_special_mapping() to mmap.c stefani
2014-02-05  8:19 ` [PATCH v12 3/9] revamp vclock_gettime.c stefani
2014-02-05  8:19 ` [PATCH v12 4/9] vclock_gettime.c __vdso_clock_gettime cleanup stefani
2014-02-05  8:20 ` [PATCH v12 5/9] replace VVAR(vsyscall_gtod_data) by gtod macro stefani
2014-02-05  8:20 ` [PATCH v12 6/9] cleanup __vdso_gettimeofday stefani
2014-02-05  8:20 ` stefani [this message]
2014-02-05  8:20 ` [PATCH v12 8/9] Add 32 bit VDSO time support for 32 bit kernel stefani
2014-02-05  8:20 ` [PATCH v12 9/9] Add 32 bit VDSO time support for 64 " stefani
2014-02-05 22:01   ` Andy Lutomirski
2014-02-06 12:10     ` Stefani Seibold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1391588404-28147-8-git-send-email-stefani@seibold.net \
    --to=stefani@seibold.net \
    --cc=Andreas.Brief@rohde-schwarz.com \
    --cc=Martin.Runge@rohde-schwarz.com \
    --cc=aarcange@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gorcunov@openvz.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xemul@parallels.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®