Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79832
b: refs/heads/master
c: 7f3646a
h: refs/heads/master
v: v3
  • Loading branch information
Roland McGrath authored and Ingo Molnar committed Jan 30, 2008
1 parent 4d1d51d commit c8ff625
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5b93049337301d6fbd3cf55db99b34e6b0dbd3a3
refs/heads/master: 7f3646aa16f496201e045183402c6614fa27b0c7
3 changes: 1 addition & 2 deletions trunk/arch/x86/vdso/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
#

# files to link into the vdso
# vdso-start.o has to be first
vobjs-y := vdso-start.o vdso-note.o vclock_gettime.o vgetcpu.o vvar.o
vobjs-y := vdso-note.o vclock_gettime.o vgetcpu.o vvar.o

# files to link into kernel
obj-y := vma.o vdso.o vdso-syms.o
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/x86/vdso/vdso-start.S

This file was deleted.

18 changes: 7 additions & 11 deletions trunk/arch/x86/vdso/vma.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,20 @@
#include <asm/vsyscall.h>
#include <asm/vgtod.h>
#include <asm/proto.h>
#include "voffset.h"
#include <asm/vdso.h>

int vdso_enabled = 1;

#define VEXTERN(x) extern typeof(__ ## x) *vdso_ ## x;
#include "vextern.h"
#include "vextern.h" /* Just for VMAGIC. */
#undef VEXTERN

extern char vdso_kernel_start[], vdso_start[], vdso_end[];
int vdso_enabled = 1;

extern char vdso_start[], vdso_end[];
extern unsigned short vdso_sync_cpuid;

struct page **vdso_pages;

static inline void *var_ref(void *vbase, char *var, char *name)
static inline void *var_ref(void *p, char *name)
{
unsigned offset = var - &vdso_kernel_start[0] + VDSO_TEXT_OFFSET;
void *p = vbase + offset;
if (*(void **)p != (void *)VMAGIC) {
printk("VDSO: variable %s broken\n", name);
vdso_enabled = 0;
Expand Down Expand Up @@ -62,9 +59,8 @@ static int __init init_vdso_vars(void)
vdso_enabled = 0;
}

#define V(x) *(typeof(x) *) var_ref(vbase, (char *)RELOC_HIDE(&x, 0), #x)
#define VEXTERN(x) \
V(vdso_ ## x) = &__ ## x;
*(typeof(__ ## x) **) var_ref(VDSO64_SYMBOL(vbase, x), #x) = &__ ## x;
#include "vextern.h"
#undef VEXTERN
return 0;
Expand Down
14 changes: 14 additions & 0 deletions trunk/include/asm-x86/vdso.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#ifndef _ASM_X86_VDSO_H
#define _ASM_X86_VDSO_H 1

extern const char VDSO64_PRELINK[];

/*
* Given a pointer to the vDSO image, find the pointer to VDSO64_name
* as that symbol is defined in the vDSO sources or linker script.
*/
#define VDSO64_SYMBOL(base, name) ({ \
extern const char VDSO64_##name[]; \
(void *) (VDSO64_##name - VDSO64_PRELINK + (unsigned long) (base)); })

#endif /* asm-x86/vdso.h */

0 comments on commit c8ff625

Please sign in to comment.