linux/arch/x86/vdso
Andy Lutomirski 8c49d9a74b x86-64: Clean up vdso/kernel shared variables
Variables that are shared between the vdso and the kernel are
currently a bit of a mess.  They are each defined with their own
magic, they are accessed differently in the kernel, the vsyscall page,
and the vdso, and one of them (vsyscall_clock) doesn't even really
exist.

This changes them all to use a common mechanism.  All of them are
delcared in vvar.h with a fixed address (validated by the linker
script).  In the kernel (as before), they look like ordinary
read-write variables.  In the vsyscall page and the vdso, they are
accessed through a new macro VVAR, which gives read-only access.

The vdso is now loaded verbatim into memory without any fixups.  As a
side bonus, access from the vdso is faster because a level of
indirection is removed.

While we're at it, pack jiffies and vgetcpu_mode into the same
cacheline.

Signed-off-by: Andy Lutomirski <luto@mit.edu>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Borislav Petkov <bp@amd64.org>
Link: http://lkml.kernel.org/r/%3C7357882fbb51fa30491636a7b6528747301b7ee9.1306156808.git.luto%40mit.edu%3E
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-05-24 14:51:28 +02:00
..
vdso32 x86: gitignore arch/x86/vdso files 2008-01-30 13:32:32 +01:00
.gitignore x86: add vdso32-int80-syms.lds to .gitignore 2008-01-30 13:33:24 +01:00
checkundef.sh x86, vdso: Don't quote $nm in the script for checking vdso references 2010-07-27 23:52:29 -07:00
Makefile x86-64: Clean up vdso/kernel shared variables 2011-05-24 14:51:28 +02:00
vclock_gettime.c x86-64: Clean up vdso/kernel shared variables 2011-05-24 14:51:28 +02:00
vdso-layout.lds.S x86 vDSO: new layout 2008-01-30 13:30:41 +01:00
vdso-note.S x86_64: move vdso 2007-10-11 11:17:10 +02:00
vdso.lds.S x86-64: Clean up vdso/kernel shared variables 2011-05-24 14:51:28 +02:00
vdso.S x86_64 vDSO: use initdata 2008-04-28 13:49:35 -07:00
vdso32-setup.c mm: arch: rename in_gate_area_no_task to in_gate_area_no_mm 2011-03-23 16:36:55 -04:00
vdso32.S x86_64: further cleanup of 32-bit compat syscall mechanisms 2008-07-16 11:08:27 +02:00
vgetcpu.c x86-64: Clean up vdso/kernel shared variables 2011-05-24 14:51:28 +02:00
vma.c x86-64: Clean up vdso/kernel shared variables 2011-05-24 14:51:28 +02:00