+ revert-x86_64-mm-vdso.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     revert x86_64-mm-vdso
has been added to the -mm tree.  Its filename is
     revert-x86_64-mm-vdso.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: revert x86_64-mm-vdso
From: Andrew Morton <akpm@xxxxxxxx>

Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 Documentation/kernel-parameters.txt |    2 
 Documentation/x86_64/mm.txt         |    2 
 arch/x86_64/Makefile                |    3 
 arch/x86_64/ia32/ia32_binfmt.c      |    1 
 arch/x86_64/kernel/time.c           |   10 +
 arch/x86_64/kernel/vmlinux.lds.S    |   10 -
 arch/x86_64/mm/init.c               |   17 ---
 arch/x86_64/vdso/Makefile           |   48 --------
 arch/x86_64/vdso/vclock_gettime.c   |  145 --------------------------
 arch/x86_64/vdso/vdso-note.S        |   25 ----
 arch/x86_64/vdso/vdso-start.S       |    2 
 arch/x86_64/vdso/vdso.S             |    2 
 arch/x86_64/vdso/vdso.lds.S         |   75 -------------
 arch/x86_64/vdso/vextern.h          |   21 ---
 arch/x86_64/vdso/vgetcpu.c          |   49 --------
 arch/x86_64/vdso/vma.c              |  117 --------------------
 arch/x86_64/vdso/vvar.c             |   10 -
 include/asm-x86_64/auxvec.h         |    2 
 include/asm-x86_64/elf.h            |   13 --
 include/asm-x86_64/mmu.h            |    1 
 include/asm-x86_64/pgtable.h        |    6 -
 include/asm-x86_64/timex.h          |    7 -
 include/asm-x86_64/vsyscall.h       |    8 -
 23 files changed, 11 insertions(+), 565 deletions(-)

diff -puN Documentation/kernel-parameters.txt~revert-x86_64-mm-vdso Documentation/kernel-parameters.txt
--- a/Documentation/kernel-parameters.txt~revert-x86_64-mm-vdso
+++ a/Documentation/kernel-parameters.txt
@@ -1692,7 +1692,7 @@ and is between 256 and 4096 characters. 
 	usbhid.mousepoll=
 			[USBHID] The interval which mice are to be polled at.
 
-	vdso=		[IA32,X86-64]
+	vdso=		[IA-32]
 			vdso=1: enable VDSO (default)
 			vdso=0: disable VDSO mapping
 
diff -puN Documentation/x86_64/mm.txt~revert-x86_64-mm-vdso Documentation/x86_64/mm.txt
--- a/Documentation/x86_64/mm.txt~revert-x86_64-mm-vdso
+++ a/Documentation/x86_64/mm.txt
@@ -12,7 +12,7 @@ ffffc20000000000 - ffffe1ffffffffff (=45
 ... unused hole ...
 ffffffff80000000 - ffffffff82800000 (=40MB)   kernel text mapping, from phys 0
 ... unused hole ...
-ffffffff88000000 - ffffffffff600000           module mapping space
+ffffffff88000000 - fffffffffff00000 (=1919MB) module mapping space
 
 The direct mapping covers all memory in the system upto the highest
 memory address (this means in some cases it can also include PCI memory
diff -puN arch/x86_64/Makefile~revert-x86_64-mm-vdso arch/x86_64/Makefile
--- a/arch/x86_64/Makefile~revert-x86_64-mm-vdso
+++ a/arch/x86_64/Makefile
@@ -82,8 +82,7 @@ head-y := arch/x86_64/kernel/head.o arch
 libs-y 					+= arch/x86_64/lib/
 core-y					+= arch/x86_64/kernel/ \
 					   arch/x86_64/mm/ \
-					   arch/x86_64/crypto/ \
-					   arch/x86_64/vdso/
+					   arch/x86_64/crypto/
 core-$(CONFIG_IA32_EMULATION)		+= arch/x86_64/ia32/
 drivers-$(CONFIG_PCI)			+= arch/x86_64/pci/
 drivers-$(CONFIG_OPROFILE)		+= arch/x86_64/oprofile/
diff -puN arch/x86_64/ia32/ia32_binfmt.c~revert-x86_64-mm-vdso arch/x86_64/ia32/ia32_binfmt.c
--- a/arch/x86_64/ia32/ia32_binfmt.c~revert-x86_64-mm-vdso
+++ a/arch/x86_64/ia32/ia32_binfmt.c
@@ -33,7 +33,6 @@
 
 int sysctl_vsyscall32 = 1;
 
-#undef ARCH_DLINFO
 #define ARCH_DLINFO do {  \
 	if (sysctl_vsyscall32) { \
 	NEW_AUX_ENT(AT_SYSINFO, (u32)(u64)VSYSCALL32_VSYSCALL); \
diff -puN arch/x86_64/kernel/time.c~revert-x86_64-mm-vdso arch/x86_64/kernel/time.c
--- a/arch/x86_64/kernel/time.c~revert-x86_64-mm-vdso
+++ a/arch/x86_64/kernel/time.c
@@ -58,6 +58,13 @@ DEFINE_SPINLOCK(i8253_lock);
 int nohpet __initdata = 0;
 static int notsc __initdata = 0;
 
+#define USEC_PER_TICK (USEC_PER_SEC / HZ)
+#define NSEC_PER_TICK (NSEC_PER_SEC / HZ)
+#define FSEC_PER_TICK (FSEC_PER_SEC / HZ)
+
+#define NS_SCALE	10 /* 2^10, carefully chosen */
+#define US_SCALE	32 /* 2^32, arbitralrily chosen */
+
 unsigned int cpu_khz;					/* TSC clocks / usec, not used here */
 EXPORT_SYMBOL(cpu_khz);
 static unsigned long hpet_period;			/* fsecs / HPET clock */
@@ -72,7 +79,6 @@ struct vxtime_data __vxtime __section_vx
 volatile unsigned long __jiffies __section_jiffies = INITIAL_JIFFIES;
 struct timespec __xtime __section_xtime;
 struct timezone __sys_tz __section_sys_tz;
-struct timespec __wall_to_monotonic __section_wall_to_monotonic;
 
 /*
  * do_gettimeoffset() returns microseconds since last timer interrupt was
@@ -458,7 +464,6 @@ static unsigned int cyc2ns_scale __read_
 
 static inline void set_cyc2ns_scale(unsigned long cpu_khz)
 {
-	vxtime.cyc2ns_scale =
 	cyc2ns_scale = (NSEC_PER_MSEC << NS_SCALE) / cpu_khz;
 }
 
@@ -993,7 +998,6 @@ void time_init_gtod(void)
 	printk(KERN_INFO "time.c: Detected %d.%03d MHz processor.\n",
 		cpu_khz / 1000, cpu_khz % 1000);
 	vxtime.quot = (USEC_PER_SEC << US_SCALE) / vxtime_hz;
-	vxtime.quot_nsec = (NSEC_PER_SEC << NS_SCALE) / vxtime_hz;
 	vxtime.tsc_quot = (USEC_PER_MSEC << US_SCALE) / cpu_khz;
 	vxtime.last_tsc = get_cycles_sync();
 
diff -puN arch/x86_64/kernel/vmlinux.lds.S~revert-x86_64-mm-vdso arch/x86_64/kernel/vmlinux.lds.S
--- a/arch/x86_64/kernel/vmlinux.lds.S~revert-x86_64-mm-vdso
+++ a/arch/x86_64/kernel/vmlinux.lds.S
@@ -111,9 +111,6 @@ SECTIONS
   .xtime : AT(VLOAD(.xtime)) { *(.xtime) }
   xtime = VVIRT(.xtime);
 
-  .wall_to_monotonic : AT(VLOAD(.wall_to_monotonic)) { *(.wall_to_monotonic) }
-  wall_to_monotonic = VVIRT(.wall_to_monotonic);
-
   . = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
   .jiffies : AT(VLOAD(.jiffies)) { *(.jiffies) }
   jiffies = VVIRT(.jiffies);
@@ -162,13 +159,6 @@ SECTIONS
   . = ALIGN(4096);
   __smp_alt_end = .;
 
-  /* Blob that is mapped into user space */
-  . = ALIGN(4096);
-  vdso_start = . ;
-  .vdso  : AT(ADDR(.vdso) - LOAD_OFFSET) { *(.vdso) }
-  . = ALIGN(4096);
-  vdso_end = .;
-
   . = ALIGN(4096);		/* Init code and data */
   __init_begin = .;
   .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
diff -puN arch/x86_64/mm/init.c~revert-x86_64-mm-vdso arch/x86_64/mm/init.c
--- a/arch/x86_64/mm/init.c~revert-x86_64-mm-vdso
+++ a/arch/x86_64/mm/init.c
@@ -152,14 +152,6 @@ static __init void set_pte_phys(unsigned
 	__flush_tlb_one(vaddr);
 }
 
-void __init
-set_kernel_map(void *vaddr,unsigned long len,unsigned long phys,pgprot_t prot)
-{
-	void *end = vaddr + ALIGN(len, PAGE_SIZE);
-	for (; vaddr < end; vaddr += PAGE_SIZE, phys += PAGE_SIZE)
-		set_pte_phys((unsigned long)vaddr, phys, prot);
-}
-
 /* NOTE: this is meant to be run only at boot */
 void __init 
 __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
@@ -774,12 +766,3 @@ int in_gate_area_no_task(unsigned long a
 {
 	return (addr >= VSYSCALL_START) && (addr < VSYSCALL_END);
 }
-
-const char *arch_vma_name(struct vm_area_struct *vma)
-{
-	if (vma->vm_mm && vma->vm_start == (long)vma->vm_mm->context.vdso)
-		return "[vdso]";
-	if (vma == &gate_vma)
-		return "[vsyscall]";
-	return NULL;
-}
diff -puN arch/x86_64/vdso/Makefile~revert-x86_64-mm-vdso /dev/null
--- a/arch/x86_64/vdso/Makefile
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# x86-64 vDSO.
-#
-
-# 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
-
-# files to link into kernel
-obj-y := vma.o vdso.o vdso-syms.o
-
-vobjs := $(foreach F,$(vobjs-y),$(obj)/$F)
-
-$(obj)/vdso.o: $(obj)/vdso.so
-
-targets += vdso.so vdso.lds
-
-# The DSO images are built using a special linker script.
-quiet_cmd_syscall = SYSCALL $@
-      cmd_syscall = $(CC) -m elf_x86_64 -nostdlib $(SYSCFLAGS_$(@F)) \
-		          -Wl,-T,$(filter-out FORCE,$^) -o $@
-
-export CPPFLAGS_vdso.lds += -P -C -U$(ARCH)
-
-vdso-flags = -fPIC -shared -s -Wl,-soname=linux-vdso.so.1 -fvisibility=hidden \
-		 $(call ld-option, -Wl$(comma)--hash-style=sysv)
-SYSCFLAGS_vdso.so = $(vdso-flags)
-
-$(obj)/vdso.o: $(src)/vdso.S $(obj)/vdso.so
-
-$(obj)/vdso.so: $(src)/vdso.lds $(vobjs) FORCE
-	$(call if_changed,syscall)
-
-CF := $(PROFILING) -mcmodel=small -fPIC -g0 -O2 -fasynchronous-unwind-tables
-
-$(obj)/vclock_gettime.o: CFLAGS = $(CF)
-$(obj)/vgetcpu.o: CFLAGS = $(CF)
-
-# We also create a special relocatable object that should mirror the symbol
-# table and layout of the linked DSO.  With ld -R we can then refer to
-# these symbols in the kernel code rather than hand-coded addresses.
-extra-y += vdso-syms.o
-$(obj)/built-in.o: $(obj)/vdso-syms.o
-$(obj)/built-in.o: ld_flags += -R $(obj)/vdso-syms.o
-
-SYSCFLAGS_vdso-syms.o = -r -d
-$(obj)/vdso-syms.o: $(src)/vdso.lds $(vobjs) FORCE
-	$(call if_changed,syscall)
diff -puN arch/x86_64/vdso/vclock_gettime.c~revert-x86_64-mm-vdso /dev/null
--- a/arch/x86_64/vdso/vclock_gettime.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright 2006 Andi Kleen, SUSE Labs.
- * Subject to the GNU Public License, v.2
- *
- * Fast user context implementation of clock_gettime and gettimeofday.
- *
- * The code should have no internal unresolved relocations.
- * Check with readelf after changing.
- */
-
-#include <linux/kernel.h>
-#include <linux/posix-timers.h>
-#include <linux/time.h>
-#include <linux/string.h>
-#include <asm/vsyscall.h>
-#include <asm/timex.h>
-#include <asm/hpet.h>
-#include <asm/unistd.h>
-#include <asm/io.h>
-#include "vextern.h"
-
-static inline void normalize_ts(struct timespec *ts)
-{
-	while (unlikely(ts->tv_nsec >= NSEC_PER_SEC)) {
-		ts->tv_nsec -= NSEC_PER_SEC;
-		++ts->tv_sec;
-	}
-	while (unlikely(ts->tv_nsec < 0)) {
-		ts->tv_nsec += NSEC_PER_SEC;
-		--ts->tv_sec;
-	}
-}
-
-static inline unsigned long long vcycles_2_ns(unsigned long long cyc)
-{
-	return (cyc * vdso_vxtime->cyc2ns_scale) >> NS_SCALE;
-}
-
-static inline unsigned long vhpet_2_ns(unsigned long ticks)
-{
-	return (ticks * vdso_vxtime->quot_nsec)  >> NS_SCALE;
-}
-
-/* noinline to get only a single patch point for CPUID. Besides
-   it saves icache. */
-static noinline void vgetns(struct timespec *ts)
-{
-	unsigned long nsec = vdso_xtime->tv_nsec;
-	if (vdso_vxtime->mode == VXTIME_HPET) {
-		/* Should support 64bit HPET here */
-		long count = hpet_readl(HPET_COUNTER);
-		nsec += vhpet_2_ns(count - vdso_vxtime->last);
-	} else {
-		long t;
-		/* Synchronize the pipeline on CPUs where RDTSC can be
-		   speculated to avoid non monoticities. Normal alternative
-		   section doesn't work here in the vDSO. Patching is done
-	           by hand in vma.c */
-		unsigned eax;
-		asm volatile(
-			"	.globl vdso_sync_cpuid\n"
-		        "vdso_sync_cpuid: cpuid"
-			: "=a" (eax)
-			: "0" (1)
-			: "ebx","ecx","edx","memory");
-		rdtscll(t);
-		t -= vdso_vxtime->last_tsc;
-		/* Mostly broken hack to handle unsynchronized TSCs
-		   that should go away. Really need per CPU
-		   TSC. Normally we avoid this by not using TSC on
-		   machines which are known to do this. */
-		if (t < 0)
-			t = 0;
-		nsec += vcycles_2_ns(t);
-	}
-	ts->tv_nsec = nsec;
-	ts->tv_sec = vdso_xtime->tv_sec;
-}
-
-static inline int do_realtime(struct timespec *ts)
-{
-	unsigned long seq;
-	do {
-		seq = read_seqbegin(vdso_xtime_lock);
-		vgetns(ts);
-	} while (unlikely(read_seqretry(vdso_xtime_lock, seq)));
-	normalize_ts(ts);
-	return 0;
-}
-
-static inline int do_monotonic(struct timespec *ts)
-{
-	unsigned long seq;
-	do {
-		seq = read_seqbegin(vdso_xtime_lock);
-		vgetns(ts);
-		ts->tv_sec += vdso_wall_to_monotonic->tv_sec;
-		ts->tv_nsec += vdso_wall_to_monotonic->tv_nsec;
-	} while (unlikely(read_seqretry(vdso_xtime_lock, seq)));
-	normalize_ts(ts);
-	return 0;
-}
-
-int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
-{
-	long ret;
-	/* Fast path */
-	if (likely(*vdso_sysctl_vsyscall))
-		switch (clock) {
-		case CLOCK_REALTIME:
-			return do_realtime(ts);
-		case CLOCK_MONOTONIC:
-			return do_monotonic(ts);
-		}
-
-	/* In all other cases do normal system call */
-	asm("syscall" : "=a" (ret) :
-	    "0" (__NR_clock_gettime),"D" (clock), "S" (ts));
-	return ret;
-}
-int clock_gettime(clockid_t, struct timespec *)
-	__attribute__((weak, alias("__vdso_clock_gettime")));
-
-int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
-{
-	long ret;
-	if (likely(*vdso_sysctl_vsyscall)) {
-		BUILD_BUG_ON(offsetof(struct timeval, tv_usec) !=
-			     offsetof(struct timespec, tv_nsec) ||
-			     sizeof(*tv) != sizeof(struct timespec));
-		do_realtime((struct timespec *)tv);
-		tv->tv_usec /= 1000;
-		if (unlikely(tz != NULL)) {
-			/* This relies on gcc inlining the memcpy. We'll notice
-			   if it ever fails to do so. */
-			memcpy(tz, vdso_sys_tz, sizeof(struct timezone));
-		}
-		return 0;
-	}
-	asm("syscall" : "=a" (ret) :
-	    "0" (__NR_gettimeofday), "D" (tv), "S" (tz));
-	return ret;
-}
-int gettimeofday(struct timeval *, struct timezone *)
-	__attribute__((weak, alias("__vdso_gettimeofday")));
diff -puN arch/x86_64/vdso/vdso-note.S~revert-x86_64-mm-vdso /dev/null
--- a/arch/x86_64/vdso/vdso-note.S
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * This supplies .note.* sections to go into the PT_NOTE inside the vDSO text.
- * Here we can supply some information useful to userland.
- */
-
-#include <linux/uts.h>
-#include <linux/version.h>
-
-#define ASM_ELF_NOTE_BEGIN(name, flags, vendor, type)			      \
-	.section name, flags;						      \
-	.balign 4;							      \
-	.long 1f - 0f;		/* name length */			      \
-	.long 3f - 2f;		/* data length */			      \
-	.long type;		/* note type */				      \
-0:	.asciz vendor;		/* vendor name */			      \
-1:	.balign 4;							      \
-2:
-
-#define ASM_ELF_NOTE_END						      \
-3:	.balign 4;		/* pad out section */			      \
-	.previous
-
-	ASM_ELF_NOTE_BEGIN(".note.kernel-version", "a", UTS_SYSNAME, 0)
-	.long LINUX_VERSION_CODE
-	ASM_ELF_NOTE_END
diff -puN arch/x86_64/vdso/vdso-start.S~revert-x86_64-mm-vdso /dev/null
--- a/arch/x86_64/vdso/vdso-start.S
+++ /dev/null
@@ -1,2 +0,0 @@
-	.globl vdso_kernel_start
-vdso_kernel_start:
diff -puN arch/x86_64/vdso/vdso.S~revert-x86_64-mm-vdso /dev/null
--- a/arch/x86_64/vdso/vdso.S
+++ /dev/null
@@ -1,2 +0,0 @@
-	.section ".vdso","a"
-	.incbin "arch/x86_64/vdso/vdso.so"
diff -puN arch/x86_64/vdso/vdso.lds.S~revert-x86_64-mm-vdso /dev/null
--- a/arch/x86_64/vdso/vdso.lds.S
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Linker script for vsyscall DSO.  The vsyscall page is an ELF shared
- * object prelinked to its virtual address, and with only one read-only
- * segment (that fits in one page).  This script controls its layout.
- */
-#include <asm/asm-offsets.h>
-
-#define VDSO_PRELINK 0xffffffffff700000
-
-SECTIONS
-{
-  . = VDSO_PRELINK + SIZEOF_HEADERS;
-
-  .hash           : { *(.hash) }		:text
-  .gnu.hash       : { *(.gnu.hash) }
-  .dynsym         : { *(.dynsym) }
-  .dynstr         : { *(.dynstr) }
-  .gnu.version    : { *(.gnu.version) }
-  .gnu.version_d  : { *(.gnu.version_d) }
-  .gnu.version_r  : { *(.gnu.version_r) }
-
-  /* This linker script is used both with -r and with -shared.
-     For the layouts to match, we need to skip more than enough
-     space for the dynamic symbol table et al.  If this amount
-     is insufficient, ld -shared will barf.  Just increase it here.  */
-  . = VDSO_PRELINK + 0x400;
-
-  .text           : { *(.text) }		:text
-  .text.ptr       : { *(.text.ptr) }		:text
-  . = VDSO_PRELINK + 0x900;
-  .data           : { *(.data) }		:text
-  .bss            : { *(.bss) }			:text
-  /* altinstructions needs work for Intel platforms */
-  .note		  : { *(.note.*) }		:text :note
-  .eh_frame_hdr   : { *(.eh_frame_hdr) }	:text :eh_frame_hdr
-  .eh_frame       : { KEEP (*(.eh_frame)) }	:text
-  .dynamic        : { *(.dynamic) }		:text :dynamic
-  .useless        : {
-  	*(.got.plt) *(.got)
-	*(.gnu.linkonce.d.*)
-	*(.dynbss)
-	*(.gnu.linkonce.b.*)
-  }						:text
-  /* altinstructions are only in -syms */
-  /DISCARD/ : { *(.altinstructions) }
-}
-
-/*
- * We must supply the ELF program headers explicitly to get just one
- * PT_LOAD segment, and set the flags explicitly to make segments read-only.
- */
-PHDRS
-{
-  text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */
-  dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
-  note PT_NOTE FLAGS(4); /* PF_R */
-  eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */
-}
-
-/*
- * This controls what symbols we export from the DSO.
- */
-VERSION
-{
-  LINUX_2.6 {
-    global:
-	clock_gettime;
-	__vdso_clock_gettime;
-	gettimeofday;
-	__vdso_gettimeofday;
-	getcpu;
-	__vdso_getcpu;
-    local: *;
-  };
-}
diff -puN arch/x86_64/vdso/vextern.h~revert-x86_64-mm-vdso /dev/null
--- a/arch/x86_64/vdso/vextern.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef VEXTERN
-#include <asm/vsyscall.h>
-#define VEXTERN(x) \
-	extern typeof(x) *vdso_ ## x __attribute__((visibility("hidden")));
-#endif
-
-#define VMAGIC 0xfeedbabeabcdefabUL
-
-/* Any kernel variables used in the vDSO must be exported in the main
-   kernel's vmlinux.lds.S/vsyscall.h/proper __section and
-   put into vextern.h and be referenced as a pointer with vdso prefix.
-   The main kernel later fills in the values.   */
-
-VEXTERN(xtime_lock)
-VEXTERN(xtime)
-VEXTERN(vxtime)
-VEXTERN(jiffies)
-VEXTERN(sysctl_vsyscall)
-VEXTERN(wall_to_monotonic)
-VEXTERN(vgetcpu_mode)
-VEXTERN(sys_tz)
diff -puN arch/x86_64/vdso/vgetcpu.c~revert-x86_64-mm-vdso /dev/null
--- a/arch/x86_64/vdso/vgetcpu.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2006 Andi Kleen, SUSE Labs.
- * Subject to the GNU Public License, v.2
- *
- * Fast user context implementation of getcpu()
- */
-
-#include <linux/kernel.h>
-#include <linux/getcpu.h>
-#include <linux/jiffies.h>
-#include <linux/time.h>
-#include <asm/vsyscall.h>
-#include "vextern.h"
-
-long __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache)
-{
-	unsigned int dummy, p;
-	unsigned long j = 0;
-
-	/* Fast cache - only recompute value once per jiffies and avoid
-	   relatively costly rdtscp/cpuid otherwise.
-	   This works because the scheduler usually keeps the process
-	   on the same CPU and this syscall doesn't guarantee its
-	   results anyways.
-	   We do this here because otherwise user space would do it on
-	   its own in a likely inferior way (no access to jiffies).
-	   If you don't like it pass NULL. */
-	if (tcache && tcache->blob[0] == (j = __jiffies)) {
-		p = tcache->blob[1];
-	} else if (*vdso_vgetcpu_mode == VGETCPU_RDTSCP) {
-		/* Load per CPU data from RDTSCP */
-		rdtscp(dummy, dummy, p);
-	} else {
-		/* Load per CPU data from GDT */
-		asm("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG));
-	}
-	if (tcache) {
-		tcache->blob[0] = j;
-		tcache->blob[1] = p;
-	}
-	if (cpu)
-		*cpu = p & 0xfff;
-	if (node)
-		*node = p >> 12;
-	return 0;
-}
-
-long getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache)
-	__attribute__((weak, alias("__vdso_getcpu")));
diff -puN arch/x86_64/vdso/vma.c~revert-x86_64-mm-vdso /dev/null
--- a/arch/x86_64/vdso/vma.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Set up the VMAs to tell the VM about the vDSO.
- */
-#include <linux/mm.h>
-#include <linux/init.h>
-#include <asm/vsyscall.h>
-#include <asm/proto.h>
-
-int vdso_enabled = 1;
-
-#define VEXTERN(x) extern typeof(__ ## x) *vdso_ ## x;
-#include "vextern.h"
-#undef VEXTERN
-
-static void check(char *name, unsigned long val)
-{
-	if (val != VMAGIC)
-		panic("%s has wrong value %lx\n", name, val);
-}
-
-extern char vdso_kernel_start[], vdso_start[], vdso_end[];
-extern unsigned short vdso_sync_cpuid;
-
-static int __init init_vdso_vars(void)
-{
-	set_kernel_map(vdso_kernel_start, vdso_end-vdso_start,
-		       __pa_symbol(&vdso_start), PAGE_KERNEL);
-#define VEXTERN(x) check(#x, (unsigned long)vdso_ ## x); vdso_ ## x = &__ ## x;
-#include "vextern.h"
-#undef VEXTERN
-
-	/* Remove pipeline synchronization on CPUs which have synchronized
-	   RDTSC like Intel Netburst.
-	   Normally this would be done by alternative(), but I didn't
-	   find a clean way to get the alternative section from the vdso
-	   into the main kernel image. So do it by hand instead. -AK */
-	if (boot_cpu_has(X86_FEATURE_SYNC_RDTSC)) {
-		printk("vdso_sync_cpuid %p:%x\n", &vdso_sync_cpuid, vdso_sync_cpuid);
-		vdso_sync_cpuid = 0x9090; 	/* NOP it out */
-	}
-
-	return 0;
-}
-__initcall(init_vdso_vars);
-
-static struct page *syscall_nopage(struct vm_area_struct *vma,
-				unsigned long adr, int *type)
-{
-	struct page *p = virt_to_page(adr - vma->vm_start + vdso_start);
-	get_page(p);
-	return p;
-}
-
-/* Prevent VMA merging */
-static void syscall_vma_close(struct vm_area_struct *vma)
-{
-}
-
-static struct vm_operations_struct syscall_vm_ops = {
-	.close = syscall_vma_close,
-	.nopage = syscall_nopage,
-};
-
-struct linux_binprm;
-
-/* Setup a VMA at program startup for the vsyscall page */
-int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack)
-{
-	struct vm_area_struct *vma;
-	struct mm_struct *mm = current->mm;
-	unsigned long addr;
-	int ret;
-
-	if (!vdso_enabled)
-		return 0;
-
-	down_write(&mm->mmap_sem);
-	addr = get_unmapped_area(NULL, 0, PAGE_SIZE, 0, 0);
-	if (IS_ERR_VALUE(addr)) {
-		ret = addr;
-		goto up_fail;
-	}
-
-	vma = kmem_cache_zalloc(vm_area_cachep, SLAB_KERNEL);
-	if (!vma) {
-		ret = -ENOMEM;
-		goto up_fail;
-	}
-
-	vma->vm_start = addr;
-	vma->vm_end = addr + round_up(vdso_end - vdso_start, PAGE_SIZE);
-	/* MAYWRITE to allow gdb to COW and set breakpoints */
-	vma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYEXEC|VM_MAYWRITE;
-	vma->vm_flags |= mm->def_flags;
-	vma->vm_page_prot = protection_map[vma->vm_flags & 7];
-	vma->vm_ops = &syscall_vm_ops;
-	vma->vm_mm = mm;
-
-	ret = insert_vm_struct(mm, vma);
-	if (unlikely(ret)) {
-		kmem_cache_free(vm_area_cachep, vma);
-		goto up_fail;
-	}
-
-	current->mm->context.vdso = (void *)addr;
-	mm->total_vm++;
-up_fail:
-	up_write(&mm->mmap_sem);
-	return ret;
-}
-
-static __init int vdso_setup(char *s)
-{
-	vdso_enabled = simple_strtoul(s, NULL, 0);
-	return 0;
-}
-__setup("vdso=", vdso_setup);
diff -puN arch/x86_64/vdso/vvar.c~revert-x86_64-mm-vdso /dev/null
--- a/arch/x86_64/vdso/vvar.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Define vDSO variables. These are part of the vDSO */
-#include <linux/kernel.h>
-#include <linux/time.h>
-#include <asm/vsyscall.h>
-#include <asm/timex.h>
-
-#define __hidden __attribute__((visibility("hidden")))
-
-#define VEXTERN(x) typeof (__ ## x) *vdso_ ## x __hidden = (void *)VMAGIC;
-#include "vextern.h"
diff -puN include/asm-x86_64/auxvec.h~revert-x86_64-mm-vdso include/asm-x86_64/auxvec.h
--- a/include/asm-x86_64/auxvec.h~revert-x86_64-mm-vdso
+++ a/include/asm-x86_64/auxvec.h
@@ -1,6 +1,4 @@
 #ifndef __ASM_X86_64_AUXVEC_H
 #define __ASM_X86_64_AUXVEC_H
 
-#define AT_SYSINFO_EHDR		33
-
 #endif
diff -puN include/asm-x86_64/elf.h~revert-x86_64-mm-vdso include/asm-x86_64/elf.h
--- a/include/asm-x86_64/elf.h~revert-x86_64-mm-vdso
+++ a/include/asm-x86_64/elf.h
@@ -163,19 +163,6 @@ extern int dump_task_fpu (struct task_st
 /* 1GB for 64bit, 8MB for 32bit */
 #define STACK_RND_MASK (test_thread_flag(TIF_IA32) ? 0x7ff : 0x3fffff)
 
-
-#define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
-struct linux_binprm;
-extern int arch_setup_additional_pages(struct linux_binprm *bprm,
-                                       int executable_stack);
-
-extern int vdso_enabled;
-
-#define ARCH_DLINFO						\
-do if (vdso_enabled) {						\
-	NEW_AUX_ENT(AT_SYSINFO_EHDR,(unsigned long)current->mm->context.vdso);\
-} while (0)
-
 #endif
 
 #endif
diff -puN include/asm-x86_64/mmu.h~revert-x86_64-mm-vdso include/asm-x86_64/mmu.h
--- a/include/asm-x86_64/mmu.h~revert-x86_64-mm-vdso
+++ a/include/asm-x86_64/mmu.h
@@ -15,7 +15,6 @@ typedef struct { 
 	rwlock_t ldtlock; 
 	int size;
 	struct semaphore sem; 
-	void *vdso;
 } mm_context_t;
 
 #endif
diff -puN include/asm-x86_64/pgtable.h~revert-x86_64-mm-vdso include/asm-x86_64/pgtable.h
--- a/include/asm-x86_64/pgtable.h~revert-x86_64-mm-vdso
+++ a/include/asm-x86_64/pgtable.h
@@ -419,9 +419,6 @@ void vmalloc_sync_all(void);
 
 extern int kern_addr_valid(unsigned long addr); 
 
-extern void set_kernel_map(void *vaddr, unsigned long len,
-			   unsigned long phys, pgprot_t prot);
-
 #define io_remap_pfn_range(vma, vaddr, pfn, size, prot)		\
 		remap_pfn_range(vma, vaddr, pfn, size, prot)
 
@@ -450,7 +447,4 @@ extern void set_kernel_map(void *vaddr, 
 #define __HAVE_ARCH_PTE_SAME
 #include <asm-generic/pgtable.h>
 
-extern void
-fix_set_pte_phys(unsigned long vaddr, unsigned long phys, pgprot_t prot);
-
 #endif /* _X86_64_PGTABLE_H */
diff -puN include/asm-x86_64/timex.h~revert-x86_64-mm-vdso include/asm-x86_64/timex.h
--- a/include/asm-x86_64/timex.h~revert-x86_64-mm-vdso
+++ a/include/asm-x86_64/timex.h
@@ -46,11 +46,4 @@ extern int read_current_timer(unsigned l
 
 extern struct vxtime_data vxtime;
 
-#define USEC_PER_TICK (USEC_PER_SEC / HZ)
-#define NSEC_PER_TICK (NSEC_PER_SEC / HZ)
-#define FSEC_PER_TICK (FSEC_PER_SEC / HZ)
-
-#define NS_SCALE	10 /* 2^10, carefully chosen */
-#define US_SCALE	32 /* 2^32, arbitralrily chosen */
-
 #endif
diff -puN include/asm-x86_64/vsyscall.h~revert-x86_64-mm-vdso include/asm-x86_64/vsyscall.h
--- a/include/asm-x86_64/vsyscall.h~revert-x86_64-mm-vdso
+++ a/include/asm-x86_64/vsyscall.h
@@ -23,7 +23,6 @@ enum vsyscall_num {
 #define __section_sysctl_vsyscall __attribute__ ((unused, __section__ (".sysctl_vsyscall"), aligned(16)))
 #define __section_xtime __attribute__ ((unused, __section__ (".xtime"), aligned(16)))
 #define __section_xtime_lock __attribute__ ((unused, __section__ (".xtime_lock"), aligned(16)))
-#define __section_wall_to_monotonic __attribute__ ((unused, __section__ (".wall_to_monotonic"), aligned(16)))
 
 #define VXTIME_TSC	1
 #define VXTIME_HPET	2
@@ -34,13 +33,11 @@ enum vsyscall_num {
 
 struct vxtime_data {
 	long hpet_address;	/* HPET base address */
+	int last;
 	unsigned long last_tsc;
 	long quot;
 	long tsc_quot;
-	int last;
 	int mode;
-	long quot_nsec;
-	long cyc2ns_scale;
 };
 
 #define hpet_readl(a)           readl((const void __iomem *)fix_to_virt(FIX_HPET_BASE) + a)
@@ -52,9 +49,7 @@ extern int __vgetcpu_mode;
 extern struct timespec __xtime;
 extern volatile unsigned long __jiffies;
 extern struct timezone __sys_tz;
-extern int __sysctl_vsyscall;
 extern seqlock_t __xtime_lock;
-extern struct timespec __wall_to_monotonic;
 
 /* kernel space (writeable) */
 extern struct vxtime_data vxtime;
@@ -62,7 +57,6 @@ extern int vgetcpu_mode;
 extern struct timezone sys_tz;
 extern int sysctl_vsyscall;
 extern seqlock_t xtime_lock;
-extern struct timespec wall_to_monotonic;
 
 extern int sysctl_vsyscall;
 
_

Patches currently in -mm which might be from akpm@xxxxxxxx are

origin.patch
git-acpi.patch
video-sysfs-support-take-2-add-dev-argument-for-backlight_device_register.patch
acpi-asus-s3-resume-fix.patch
sony_apci-resume.patch
video-sysfs-support-take-2-add-dev-argument-for-backlight_device_register-sony_acpi-fix.patch
git-alsa-fixup.patch
git-cpufreq-prep.patch
git-cpufreq.patch
git-powerpc.patch
fix-gregkh-driver-sound-device.patch
platform_driver_probe-can-save-codespace-save-codespace.patch
git-dvb.patch
git-dvb-fixup.patch
git-gfs2-nmw.patch
git-ia64.patch
git-input.patch
git-input-fixup.patch
git-libata-all.patch
via-pata-controller-xfer-fixes-fix.patch
git-mtd.patch
git-netdev-all.patch
git-netdev-all-fixup.patch
libphy-dont-do-that.patch
update-smc91x-driver-with-arm-versatile-board-info.patch
drivers-net-ns83820c-add-paramter-to-disable-auto.patch
git-net.patch
net-uninline-skb_put.patch
ioat-warning-fix.patch
tidy-gregkh-pci-pci-check-szhi-when-sz-is-0-when-64-bit-iomem-bigger-than-4g.patch
fix-gregkh-pci-pci-check-szhi-when-sz-is-0-when-64-bit-iomem-bigger-than-4g.patch
fix-2-gregkh-pci-pci-check-szhi-when-sz-is-0-when-64-bit-iomem-bigger-than-4g.patch
pci-fix-multiple-problems-with-via-hardware-warning-fix.patch
git-scsi-misc.patch
drivers-scsi-mca_53c9xc-save_flags-cli-removal.patch
git-sas-fixup.patch
nokia-e70-is-an-unusual-device.patch
git-watchdog.patch
pre-x86_64-mm-i386-reloc-abssym.patch
revert-x86_64-mm-vdso.patch
post-x86_64-mm-i386-reloc-abssym.patch
touchkit-ps-2-touchscreen-driver.patch
get-rid-of-zone_table.patch
new-scheme-to-preempt-swap-token-tidy.patch
balance_pdgat-cleanup.patch
add-numa-node-information-to-struct-device-tidy.patch
node-aware-skb-allocation-fix-for-device-tree-changes.patch
radix-tree-rcu-lockless-readside.patch
acx1xx-wireless-driver.patch
security-introduce-file-caps-tweaks.patch
security-introduce-file-caps-warning-fix.patch
swsusp-add-resume_offset-command-line-parameter-rev-2.patch
add-include-linux-freezerh-and-move-definitions-from-ueagle-fix.patch
add-include-linux-freezerh-and-move-definitions-from-ucb1400_ts-fix.patch
cciss-set-sector_size-to-2048-for-performance-tidy.patch
deprecate-smbfs-in-favour-of-cifs.patch
edac-new-opteron-athlon64-memory-controller-driver.patch
kbuild-dont-put-temp-files-in-the-source-tree.patch
lockdep-annotate-nfs-nfsd-in-kernel-sockets-tidy.patch
drivers-add-lcd-support-3-Kconfig-fix.patch
probe_kernel_address-needs-to-do-set_fs.patch
slab-use-probe_kernel_address.patch
lockdep-spin_lock_irqsave_nested-fix.patch
lockdep-spin_lock_irqsave_nested-fix-2.patch
aio-use-prepare_to_wait.patch
exar-quad-port-serial-fix.patch
vfs_getattr-remove-dead-code.patch
ext3-uninline-large-functions.patch
ext4-uninline-large-functions.patch
uninline-module_put.patch
sleep-profiling-fixes.patch
sleep-profiling-fix.patch
debug-workqueue-locking-sanity-fix.patch
pcengines-wrap-led-support-fix.patch
driver-base-memoryc-remove-warnings-of.patch
remove-kernel-syscalls-x86_64-fix.patch
protect-ext2-ioctl-modifying-append_only-immutable-etc-with-i_mutex.patch
remove-hash_highmem.patch
elf-fix-kcore-note-size-calculation-fix.patch
reiserfs-add-missing-d-cache-flushing-tweak.patch
io-accounting-core-statistics.patch
io-accounting-core-statistics-fix.patch
clean-up-__set_page_dirty_nobuffers.patch
io-accounting-write-accounting.patch
io-accounting-write-cancel-accounting.patch
io-accounting-read-accounting-2.patch
io-accounting-read-accounting-nfs-fix.patch
io-accounting-read-accounting-cifs-fix.patch
io-accounting-metadata-read-accounting.patch
io-accounting-direct-io.patch
io-accounting-report-in-procfs.patch
cleanup-taskstatsh.patch
io-accounting-via-taskstats.patch
getdelays-various-fixes.patch
io-accounting-add-to-getdelays.patch
ext2-reservations.patch
pktcdvd-bio-write-congestion-using-blk_congestion_wait-fix.patch
bug-test-1.patch
fsstack-introduce-fsstack_copy_attrinode_-tidy.patch
log2-implement-a-general-integer-log2-facility-in-the-kernel-fix.patch
log2-implement-a-general-integer-log2-facility-in-the-kernel-vs-git-cryptodev.patch
log2-implement-a-general-integer-log2-facility-in-the-kernel-ppc-fix.patch
add-process_session-helper-routine-deprecate-old-field-tidy.patch
add-process_session-helper-routine-deprecate-old-field-fix-warnings.patch
add-process_session-helper-routine-deprecate-old-field-fix-warnings-2.patch
mxser-session-warning-fix.patch
tty-switch-to-ktermios-and-new-framework-warning-fix.patch
tty-switch-to-ktermios-bluetooth-fix.patch
tty_ioctl-use-termios-for-the-old-structure-and-termios2-fix.patch
char-istallion-correct-fail-paths-fix.patch
drivers-isdn-handcrafted-min-max-macro-removal-fix.patch
fault-injection-capabilities-infrastructure-tidy.patch
fault-injection-capabilities-infrastructure-tweaks.patch
fault-injection-Kconfig-cleanup.patch
fault-injection-stacktrace-filtering-kconfig-fix.patch
kernel-schedc-whitespace-cleanups-more.patch
swap_prefetch-vs-zoned-counters.patch
add-include-linux-freezerh-and-move-definitions-from-prefetch.patch
readahead-kconfig-options-fix.patch
readahead-minmax_ra_pages.patch
readahead-sysctl-parameters.patch
readahead-call-scheme-ifdef-fix.patch
make-copy_from_user_inatomic-not-zero-the-tail-on-i386-vs-reiser4.patch
resier4-add-include-linux-freezerh-and-move-definitions-from.patch
make-kmem_cache_destroy-return-void-reiser4.patch
reiser4-hardirq-include-fix.patch
reiser4-run-truncate_inode_pages-in-reiser4_delete_inode.patch
reiser4-get_sb_dev-fix.patch
reiser4-vs-zoned-allocator.patch
reiser4-temp-fix.patch
hpt3xx-rework-rate-filtering-tidy.patch
video-get-the-default-mode-from-the-right-database.patch
various-fbdev-files-mark-structs-fix.patch
md-allow-reads-that-have-bypassed-the-cache-to-be-retried-on-failure-fix.patch
statistics-infrastructure-fix-buffer-overflow-in-histogram-with-linear-tidy.patch
extend-notifier_call_chain-to-count-nr_calls-made.patch
extend-notifier_call_chain-to-count-nr_calls-made-fixes-2.patch
define-and-use-new-eventscpu_lock_acquire-and-cpu_lock_release-fix.patch
gtod-persistent-clock-support-i386.patch
updated-hrtimers-state-tracking.patch
updated-i386-convert-to-clock-event-devices.patch
updated-i386-convert-to-clock-event-devices-fix.patch
updated-gtod-mark-tsc-unusable-for-highres-timers.patch
round_jiffies-infrastructure-fix.patch
clocksource-small-cleanup-2-fix.patch
kevent_user_wait-retval-fix.patch
kevent-v23-socket-notifications-fix-again.patch
kevent-timer-notifications-fix.patch
nr_blockdev_pages-in_interrupt-warning.patch
device-suspend-debug.patch
mutex-subsystem-synchro-test-module-fix.patch
slab-leaks3-default-y.patch
x86-kmap_atomic-debugging.patch
restore-rogue-readahead-printk.patch
put_bh-debug.patch
e1000-printk-warning-fixes.patch
acpi_format_exception-debug.patch
jmicron-warning-fix.patch
squash-ipc-warnings.patch
squash-udf-warnings.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux