Commit e6bcc52f authored by Jeff Dike's avatar Jeff Dike

Merge http://jdike.stearns.org:5000/updates-2.5

into uml.karaya.com:/home/jdike/linux/2.5/uml-2.5
parents adaf480d 170f6c8f
......@@ -16,6 +16,7 @@
#include "linux/binfmts.h"
#include "asm/signal.h"
#include "asm/uaccess.h"
#include "asm/unistd.h"
#include "user_util.h"
#include "kern_util.h"
#include "signal_kern.h"
......@@ -70,6 +71,9 @@ static int handle_signal(struct pt_regs *regs, unsigned long signr,
ret = 0;
switch(error){
case -ERESTART_RESTARTBLOCK:
current_thread_info()->restart_block.fn =
do_no_restart_syscall;
case -ERESTARTNOHAND:
ret = -EINTR;
break;
......@@ -161,6 +165,10 @@ static int kern_do_signal(struct pt_regs *regs, sigset_t *oldset, int error)
PT_REGS_ORIG_SYSCALL(regs) = PT_REGS_SYSCALL_NR(regs);
PT_REGS_RESTART_SYSCALL(regs);
}
else if(PT_REGS_SYSCALL_RET(regs) == -ERESTART_RESTARTBLOCK){
PT_REGS_SYSCALL_RET(regs) = __NR_restart_syscall;
PT_REGS_RESTART_SYSCALL(regs);
}
}
/* This closes a way to execute a system call on the host. If
......
......@@ -8,10 +8,12 @@
#include "linux/version.h"
#include "linux/sys.h"
#include "linux/swap.h"
#include "linux/sysctl.h"
#include "asm/signal.h"
#include "sysdep/syscalls.h"
#include "kern_util.h"
extern syscall_handler_t sys_restart_syscall;
extern syscall_handler_t sys_ni_syscall;
extern syscall_handler_t sys_exit;
extern syscall_handler_t sys_fork;
......@@ -253,7 +255,7 @@ extern syscall_handler_t um_stime;
#endif
syscall_handler_t *sys_call_table[] = {
[ 0 ] = sys_ni_syscall,
[ __NR_restart_syscall ] = sys_restart_syscall,
[ __NR_exit ] = sys_exit,
[ __NR_fork ] = sys_fork,
[ __NR_read ] = (syscall_handler_t *) sys_read,
......
......@@ -187,7 +187,11 @@ int sys_ipc (uint call, int first, int second,
switch (call) {
case SEMOP:
return sys_semop (first, (struct sembuf *)ptr, second);
return sys_semtimedop(first, (struct sembuf *) ptr, second,
NULL);
case SEMTIMEDOP:
return sys_semtimedop(first, (struct sembuf *) ptr, second,
(const struct timespec *) fifth);
case SEMGET:
return sys_semget (first, second, third);
case SEMCTL: {
......
......@@ -59,18 +59,27 @@ SECTIONS
__uml_setup_start = .;
.uml.setup.init : { *(.uml.setup.init) }
__uml_setup_end = .;
__uml_help_start = .;
.uml.help.init : { *(.uml.help.init) }
__uml_help_end = .;
__uml_postsetup_start = .;
.uml.postsetup.init : { *(.uml.postsetup.init) }
__uml_postsetup_end = .;
__setup_start = .;
.init.setup : { *(.init.setup) }
__setup_end = .;
__start___param = .;
__param : { *(__param) }
__stop___param = .;
__per_cpu_start = . ;
.data.percpu : { *(.data.percpu) }
__per_cpu_end = . ;
__per_cpu_end = . ;
__initcall_start = .;
.initcall.init : {
*(.initcall1.init)
......
......@@ -373,15 +373,15 @@ static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address)
}
/* Find an entry in the third-level page table.. */
#define __pte_offset(address) ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
#define __pte_offset(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
#define pte_offset_kernel(dir, address) \
((pte_t *) pmd_page_kernel(*(dir)) + __pte_offset(address))
#define pte_offset_map(dir, address) \
((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE0) + __pte_offset(address))
#define pte_offset_map_nested(dir, address) \
((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE1) + __pte_offset(address))
#define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0)
#define pte_unmap_nested(pte) kunmap_atomic(pte, KM_PTE1)
#define pte_unmap(pte) kunmap_atomic((pte), KM_PTE0)
#define pte_unmap_nested(pte) kunmap_atomic((pte), KM_PTE1)
#if defined(CONFIG_HIGHPTE) && defined(CONFIG_HIGHMEM4G)
typedef u32 pte_addr_t;
......
......@@ -20,14 +20,9 @@ struct thread_info {
mm_segment_t addr_limit; /* thread address space:
0-0xBFFFFFFF for user
0-0xFFFFFFFF for kernel */
struct restart_block restart_block;
};
/*
* macros/functions for gaining access to the thread information structure
*
* preempt_count needs to be 1 initially, until the scheduler is functional.
*/
#define INIT_THREAD_INFO(tsk) \
{ \
task: &tsk, \
......@@ -36,6 +31,9 @@ struct thread_info {
cpu: 0, \
preempt_count: 1, \
addr_limit: KERNEL_DS, \
restart_block: { \
fn: do_no_restart_syscall, \
}, \
}
#define init_thread_info (init_thread_union.thread_info)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment