git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
x86_64
/
kernel
/
sys_x86_64.c
diff --git
a/arch/x86_64/kernel/sys_x86_64.c
b/arch/x86_64/kernel/sys_x86_64.c
index
e6718e9
..
76bf7c2
100644
(file)
--- a/
arch/x86_64/kernel/sys_x86_64.c
+++ b/
arch/x86_64/kernel/sys_x86_64.c
@@
-16,7
+16,6
@@
#include <linux/file.h>
#include <linux/utsname.h>
#include <linux/personality.h>
#include <linux/file.h>
#include <linux/utsname.h>
#include <linux/personality.h>
-#include <linux/vs_cvirt.h>
#include <asm/uaccess.h>
#include <asm/ia32.h>
#include <asm/uaccess.h>
#include <asm/ia32.h>
@@
-69,13
+68,7
@@
out:
static void find_start_end(unsigned long flags, unsigned long *begin,
unsigned long *end)
{
static void find_start_end(unsigned long flags, unsigned long *begin,
unsigned long *end)
{
-#ifdef CONFIG_IA32_EMULATION
- if (test_thread_flag(TIF_IA32)) {
- *begin = TASK_UNMAPPED_32;
- *end = IA32_PAGE_OFFSET;
- } else
-#endif
- if (flags & MAP_32BIT) {
+ if (!test_thread_flag(TIF_IA32) && (flags & MAP_32BIT)) {
/* This is usually used needed to map code in small
model, so it needs to be in the first 31bit. Limit
it to that. This means we need to move the
/* This is usually used needed to map code in small
model, so it needs to be in the first 31bit. Limit
it to that. This means we need to move the
@@
-85,10
+78,10
@@
static void find_start_end(unsigned long flags, unsigned long *begin,
of playground for now. -AK */
*begin = 0x40000000;
*end = 0x80000000;
of playground for now. -AK */
*begin = 0x40000000;
*end = 0x80000000;
- } else {
- *begin = TASK_UNMAPPED_
64;
+ } else {
+ *begin = TASK_UNMAPPED_
BASE;
*end = TASK_SIZE;
*end = TASK_SIZE;
-
}
+ }
}
unsigned long
}
unsigned long
@@
-112,6
+105,11
@@
arch_get_unmapped_area(struct file *filp, unsigned long addr,
(!vma || addr + len <= vma->vm_start))
return addr;
}
(!vma || addr + len <= vma->vm_start))
return addr;
}
+ if (((flags & MAP_32BIT) || test_thread_flag(TIF_IA32))
+ && len <= mm->cached_hole_size) {
+ mm->cached_hole_size = 0;
+ mm->free_area_cache = begin;
+ }
addr = mm->free_area_cache;
if (addr < begin)
addr = begin;
addr = mm->free_area_cache;
if (addr < begin)
addr = begin;
@@
-127,6
+125,7
@@
full_search:
*/
if (start_addr != begin) {
start_addr = addr = begin;
*/
if (start_addr != begin) {
start_addr = addr = begin;
+ mm->cached_hole_size = 0;
goto full_search;
}
return -ENOMEM;
goto full_search;
}
return -ENOMEM;
@@
-138,6
+137,9
@@
full_search:
mm->free_area_cache = addr + len;
return addr;
}
mm->free_area_cache = addr + len;
return addr;
}
+ if (addr + mm->cached_hole_size < vma->vm_start)
+ mm->cached_hole_size = vma->vm_start - addr;
+
addr = vma->vm_end;
}
}
addr = vma->vm_end;
}
}
@@
-146,23
+148,9
@@
asmlinkage long sys_uname(struct new_utsname __user * name)
{
int err;
down_read(&uts_sem);
{
int err;
down_read(&uts_sem);
- err = copy_to_user(name,
vx_new_
utsname(), sizeof (*name));
+ err = copy_to_user(name, utsname(), sizeof (*name));
up_read(&uts_sem);
if (personality(current->personality) == PER_LINUX32)
err |= copy_to_user(&name->machine, "i686", 5);
return err ? -EFAULT : 0;
}
up_read(&uts_sem);
if (personality(current->personality) == PER_LINUX32)
err |= copy_to_user(&name->machine, "i686", 5);
return err ? -EFAULT : 0;
}
-
-asmlinkage long sys_time64(long __user * tloc)
-{
- struct timeval now;
- int i;
-
- do_gettimeofday(&now);
- i = now.tv_sec;
- if (tloc) {
- if (put_user(i,tloc))
- i = -EFAULT;
- }
- return i;
-}