diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/x86_64/ia32/ia32entry.S x/arch/x86_64/ia32/ia32entry.S --- x-ref/arch/x86_64/ia32/ia32entry.S 2003-05-11 05:06:25.000000000 +0200 +++ x/arch/x86_64/ia32/ia32entry.S 2003-05-11 05:43:35.000000000 +0200 @@ -369,9 +369,16 @@ ia32_sys_call_table: .quad quiet_ni_syscall /* fremovexattr - 237 */ .quad sys_tkill .quad sys_sendfile64 - .quad quiet_ni_syscall /* futex */ - .quad quiet_ni_syscall /* sched_setaffinity */ - .quad quiet_ni_syscall /* sched_getaffinity */ + .quad sys_futex + .quad sys32_sched_setaffinity + .quad sys32_sched_getaffinity + .quad sys_ni_syscall /* set_thread_area */ + .quad sys_ni_syscall /* get_thread_area */ + .quad sys32_io_setup + .quad sys_io_destroy + .quad sys_io_getevents + .quad sys_io_submit + .quad sys_io_cancel ia32_syscall_end: .rept IA32_NR_syscalls-(ia32_syscall_end-ia32_sys_call_table)/8 .quad ni_syscall diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/x86_64/ia32/sys_ia32.c x/arch/x86_64/ia32/sys_ia32.c --- x-ref/arch/x86_64/ia32/sys_ia32.c 2003-05-11 05:06:25.000000000 +0200 +++ x/arch/x86_64/ia32/sys_ia32.c 2003-05-11 05:42:45.000000000 +0200 @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #include @@ -1370,7 +1371,7 @@ asmlinkage long sys32_fcntl64(unsigned i int ret = 0; int oldcmd = cmd; unsigned long oldarg = arg; - + switch (cmd) { case F_GETLK64: cmd = F_GETLK; @@ -2519,6 +2520,57 @@ long asmlinkage sys32_nfsservctl(int cmd } #endif +extern long sys_io_setup(unsigned nr_reqs, aio_context_t *ctxp); + + +int sys_sched_getaffinity(pid_t pid, unsigned int len, unsigned long *new_mask_ptr); +int sys_sched_setaffinity(pid_t pid, unsigned int len, unsigned long *new_mask_ptr); + +/* only works on LE */ +int sys32_sched_setaffinity(pid_t pid, unsigned int len, + unsigned int *new_mask_ptr) +{ + mm_segment_t oldfs = get_fs(); + unsigned long mask; + int err; + if (get_user(mask, new_mask_ptr)) + return -EFAULT; + set_fs(KERNEL_DS); + err = sys_sched_setaffinity(pid,sizeof(mask),&mask); + set_fs(oldfs); + return err; +} + +/* only works on LE */ +int sys32_sched_getaffinity(pid_t pid, unsigned int len, + unsigned int *new_mask_ptr) +{ + mm_segment_t oldfs = get_fs(); + unsigned long mask; + int err; + mask = 0; + set_fs(KERNEL_DS); + err = sys_sched_getaffinity(pid,sizeof(mask),&mask); + set_fs(oldfs); + if (!err) + err = put_user((u32)mask, new_mask_ptr); + return err; +} + +long sys32_io_setup(unsigned nr_reqs, u32 *ctx32p) +{ + long ret; + aio_context_t ctx64; + mm_segment_t oldfs = get_fs(); + set_fs(KERNEL_DS); + ret = sys_io_setup(nr_reqs, &ctx64); + set_fs(oldfs); + /* truncating is ok because it's a user address */ + if (!ret) + ret = put_user((u32)ctx64, ctx32p); + return ret; +} + long sys32_module_warning(void) { static long warn_time = -(60*HZ); diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/x86_64/kernel/x8664_ksyms.c x/arch/x86_64/kernel/x8664_ksyms.c --- x-ref/arch/x86_64/kernel/x8664_ksyms.c 2003-05-11 05:42:44.000000000 +0200 +++ x/arch/x86_64/kernel/x8664_ksyms.c 2003-05-11 05:42:45.000000000 +0200 @@ -194,20 +194,11 @@ EXPORT_SYMBOL(copy_from_user); EXPORT_SYMBOL(copy_to_user); EXPORT_SYMBOL(copy_user_generic); -#if 0 /* Export kernel syscalls */ -EXPORT_SYMBOL(sys_wait4); -EXPORT_SYMBOL(sys_exit); -EXPORT_SYMBOL(sys_write); -EXPORT_SYMBOL(sys_read); -EXPORT_SYMBOL(sys_open); -EXPORT_SYMBOL(sys_lseek); -EXPORT_SYMBOL(sys_dup); EXPORT_SYMBOL(sys_delete_module); -EXPORT_SYMBOL(sys_sync); EXPORT_SYMBOL(sys_pause); -EXPORT_SYMBOL(sys_setsid); /* Rather dubious */ -#endif + +EXPORT_SYMBOL(cpu_khz); EXPORT_SYMBOL(memcpy_fromio); EXPORT_SYMBOL(memcpy_toio); diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/x86_64/mm/fault.c x/arch/x86_64/mm/fault.c --- x-ref/arch/x86_64/mm/fault.c 2003-05-11 05:42:44.000000000 +0200 +++ x/arch/x86_64/mm/fault.c 2003-05-11 05:42:45.000000000 +0200 @@ -198,7 +198,6 @@ good_area: goto bad_area; } -survive: /* * If for any reason at all we couldn't handle the fault, * make sure we exit gracefully rather than endlessly redo @@ -286,8 +285,7 @@ no_context: out_of_memory: up_read(&mm->mmap_sem); if (current->pid == 1) { - tsk->policy |= SCHED_YIELD; - schedule(); + yield(); goto again; } printk("VM: killing process %s\n", tsk->comm); diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/x86_64/mm/numa.c x/arch/x86_64/mm/numa.c --- x-ref/arch/x86_64/mm/numa.c 2003-05-11 05:06:25.000000000 +0200 +++ x/arch/x86_64/mm/numa.c 2003-05-11 05:42:45.000000000 +0200 @@ -73,6 +73,8 @@ void __init setup_node_bootmem(int nodei if (nodeid > maxnode) maxnode = nodeid; + if (nodeid+1 > numnodes) + numnodes = nodeid + 1; nodes_present |= (1UL << nodeid); }