[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrXoT0iZy2LqUqnhaZKiojpw432U2AGBdcnDQe+JE72PiA@mail.gmail.com>
Date: Tue, 4 Feb 2014 10:16:43 -0800
From: Andy Lutomirski <luto@...capital.net>
To: Stefani Seibold <stefani@...bold.net>
Cc: Greg KH <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
X86 ML <x86@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, Andi Kleen <ak@...ux.intel.com>,
Andrea Arcangeli <aarcange@...hat.com>,
John Stultz <john.stultz@...aro.org>,
Pavel Emelyanov <xemul@...allels.com>,
Cyrill Gorcunov <gorcunov@...nvz.org>,
andriy.shevchenko@...ux.intel.com, Martin.Runge@...de-schwarz.com,
Andreas.Brief@...de-schwarz.com
Subject: Re: [PATCH v11 7/9] introduce VVAR marco for vdso32
On Tue, Feb 4, 2014 at 2:15 AM, <stefani@...bold.net> wrote:
> From: Stefani Seibold <stefani@...bold.net>
>
> This patch revamp the vvar.h for introduce the VVAR macro for vdso32.
I like this approach better. Thanks.
>
> Signed-off-by: Stefani Seibold <stefani@...bold.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
>
--
Andy Lutomirski
AMA Capital Management, LLC
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists