aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/vdso
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2008-01-30 07:30:42 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:30:42 -0500
commit6c3652efcafa6a6d795093362cb4290c84994b5c (patch)
tree1587379f45a7145a64c3103b40e12b01c46ea559 /arch/x86/vdso
parent0249c9c1e7505c2b020bcc6deaf1e0415de9943e (diff)
x86 vDSO: i386 vdso32
This makes the i386 kernel use the new vDSO build in arch/x86/vdso/vdso32/ to replace the old one from arch/x86/kernel/. Signed-off-by: Roland McGrath <roland@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/vdso')
-rw-r--r--arch/x86/vdso/Makefile8
-rw-r--r--arch/x86/vdso/vdso32.S15
-rw-r--r--arch/x86/vdso/vdso32/note.S3
-rw-r--r--arch/x86/vdso/vdso32/sysenter.S3
4 files changed, 23 insertions, 6 deletions
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
index a02e1ca2a1bc..ca2aabf8ed39 100644
--- a/arch/x86/vdso/Makefile
+++ b/arch/x86/vdso/Makefile
@@ -14,7 +14,8 @@ vdso-install-$(VDSO32-y) += $(vdso32-y:=.so)
14vobjs-y := vdso-note.o vclock_gettime.o vgetcpu.o vvar.o 14vobjs-y := vdso-note.o vclock_gettime.o vgetcpu.o vvar.o
15 15
16# files to link into kernel 16# files to link into kernel
17obj-y := vma.o vdso.o 17obj-$(VDSO64-y) += vma.o vdso.o
18obj-$(CONFIG_X86_32) += vdso32.o
18 19
19vobjs := $(foreach F,$(vobjs-y),$(obj)/$F) 20vobjs := $(foreach F,$(vobjs-y),$(obj)/$F)
20 21
@@ -52,7 +53,7 @@ $(obj)/vclock_gettime.o: KBUILD_CFLAGS = $(CFL)
52$(obj)/vgetcpu.o: KBUILD_CFLAGS = $(CFL) 53$(obj)/vgetcpu.o: KBUILD_CFLAGS = $(CFL)
53 54
54targets += vdso-syms.lds 55targets += vdso-syms.lds
55obj-y += vdso-syms.lds 56obj-$(VDSO64-y) += vdso-syms.lds
56 57
57# 58#
58# Match symbols in the DSO that look like VDSO*; produce a file of constants. 59# Match symbols in the DSO that look like VDSO*; produce a file of constants.
@@ -68,6 +69,7 @@ $(obj)/%-syms.lds: $(obj)/%.so.dbg FORCE
68# 69#
69# Build multiple 32-bit vDSO images to choose from at boot time. 70# Build multiple 32-bit vDSO images to choose from at boot time.
70# 71#
72obj-$(VDSO32-y) += vdso32-syms.lds
71vdso32.so-$(CONFIG_X86_32) += int80 73vdso32.so-$(CONFIG_X86_32) += int80
72vdso32.so-$(VDSO32-y) += sysenter 74vdso32.so-$(VDSO32-y) += sysenter
73 75
@@ -84,6 +86,8 @@ targets += vdso32/note.o $(vdso32.so-y:%=vdso32/%.o)
84 86
85extra-y += $(vdso32.so-y:%=vdso32-%.so) 87extra-y += $(vdso32.so-y:%=vdso32-%.so)
86 88
89$(obj)/vdso32.o: $(vdso32.so-y:%=$(obj)/vdso32-%.so)
90
87KBUILD_AFLAGS_32 := $(filter-out -m64,$(KBUILD_AFLAGS)) 91KBUILD_AFLAGS_32 := $(filter-out -m64,$(KBUILD_AFLAGS))
88$(vdso32.so-y:%=$(obj)/vdso32-%.so.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_32) 92$(vdso32.so-y:%=$(obj)/vdso32-%.so.dbg): KBUILD_AFLAGS = $(KBUILD_AFLAGS_32)
89$(vdso32.so-y:%=$(obj)/vdso32-%.so.dbg): asflags-$(CONFIG_X86_64) += -m32 93$(vdso32.so-y:%=$(obj)/vdso32-%.so.dbg): asflags-$(CONFIG_X86_64) += -m32
diff --git a/arch/x86/vdso/vdso32.S b/arch/x86/vdso/vdso32.S
new file mode 100644
index 000000000000..cab020c99c3d
--- /dev/null
+++ b/arch/x86/vdso/vdso32.S
@@ -0,0 +1,15 @@
1#include <linux/init.h>
2
3__INITDATA
4
5 .globl vsyscall_int80_start, vsyscall_int80_end
6vsyscall_int80_start:
7 .incbin "arch/x86/vdso/vdso32-int80.so"
8vsyscall_int80_end:
9
10 .globl vsyscall_sysenter_start, vsyscall_sysenter_end
11vsyscall_sysenter_start:
12 .incbin "arch/x86/vdso/vdso32-sysenter.so"
13vsyscall_sysenter_end:
14
15__FINIT
diff --git a/arch/x86/vdso/vdso32/note.S b/arch/x86/vdso/vdso32/note.S
index 0cf934f2633e..c83f25734696 100644
--- a/arch/x86/vdso/vdso32/note.S
+++ b/arch/x86/vdso/vdso32/note.S
@@ -35,10 +35,9 @@ ELFNOTE_END
35 35
36#include "../../xen/vdso.h" /* Defines VDSO_NOTE_NONEGSEG_BIT. */ 36#include "../../xen/vdso.h" /* Defines VDSO_NOTE_NONEGSEG_BIT. */
37 37
38 .globl VDSO_NOTE_MASK
39ELFNOTE_START(GNU, 2, "a") 38ELFNOTE_START(GNU, 2, "a")
40 .long 1 /* ncaps */ 39 .long 1 /* ncaps */
41VDSO_NOTE_MASK: 40VDSO32_NOTE_MASK: /* Symbol used by arch/x86/xen/setup.c */
42 .long 0 /* mask */ 41 .long 0 /* mask */
43 .byte VDSO_NOTE_NONEGSEG_BIT; .asciz "nosegneg" /* bit, name */ 42 .byte VDSO_NOTE_NONEGSEG_BIT; .asciz "nosegneg" /* bit, name */
44ELFNOTE_END 43ELFNOTE_END
diff --git a/arch/x86/vdso/vdso32/sysenter.S b/arch/x86/vdso/vdso32/sysenter.S
index 4b98fc41d3e0..109bfa394eaa 100644
--- a/arch/x86/vdso/vdso32/sysenter.S
+++ b/arch/x86/vdso/vdso32/sysenter.S
@@ -45,8 +45,7 @@ __kernel_vsyscall:
45 /* 14: System call restart point is here! (SYSENTER_RETURN-2) */ 45 /* 14: System call restart point is here! (SYSENTER_RETURN-2) */
46 jmp .Lenter_kernel 46 jmp .Lenter_kernel
47 /* 16: System call normal return point is here! */ 47 /* 16: System call normal return point is here! */
48 .globl SYSENTER_RETURN /* Symbol used by sysenter.c */ 48VDSO32_SYSENTER_RETURN: /* Symbol used by sysenter.c via vdso32-syms.h */
49SYSENTER_RETURN:
50 pop %ebp 49 pop %ebp
51.Lpop_ebp: 50.Lpop_ebp:
52 pop %edx 51 pop %edx