Commit 1d3468a6 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds

[PATCH] uml: move _kern.c files

Move most *_kern.c files in arch/um/kernel to *.c.  This makes UML somewhat
more closely resemble the other arches.

[akpm@osdl.org: use the new INTF_* flags]
Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 469226a4
...@@ -6,11 +6,10 @@ ...@@ -6,11 +6,10 @@
extra-y := vmlinux.lds extra-y := vmlinux.lds
clean-files := clean-files :=
obj-y = config.o exec_kern.o exitcode.o \ obj-y = config.o exec.o exitcode.o init_task.o irq.o ksyms.o mem.o \
init_task.o irq.o ksyms.o mem.o physmem.o \ physmem.o process_kern.o ptrace.o reboot.o resource.o sigio.o \
process_kern.o ptrace.o reboot.o resource.o sigio_kern.o \ signal.o smp.o syscall.o sysrq.o time.o tlb.o trap.o uaccess.o \
signal_kern.o smp.o syscall_kern.o sysrq.o \ um_arch.o umid.o
time_kern.o tlb.o trap_kern.o uaccess.o um_arch.o umid.o
obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o
obj-$(CONFIG_GPROF) += gprof_syms.o obj-$(CONFIG_GPROF) += gprof_syms.o
......
...@@ -31,18 +31,27 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp) ...@@ -31,18 +31,27 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
CHOOSE_MODE_PROC(start_thread_tt, start_thread_skas, regs, eip, esp); CHOOSE_MODE_PROC(start_thread_tt, start_thread_skas, regs, eip, esp);
} }
#ifdef CONFIG_TTY_LOG
extern void log_exec(char **argv, void *tty);
#endif
static long execve1(char *file, char __user * __user *argv, static long execve1(char *file, char __user * __user *argv,
char __user *__user *env) char __user *__user *env)
{ {
long error; long error;
#ifdef CONFIG_TTY_LOG #ifdef CONFIG_TTY_LOG
log_exec(argv, current->tty); task_lock(current);
log_exec(argv, current->signal->tty);
task_unlock(current);
#endif #endif
error = do_execve(file, argv, env, &current->thread.regs); error = do_execve(file, argv, env, &current->thread.regs);
if (error == 0){ if (error == 0){
task_lock(current); task_lock(current);
current->ptrace &= ~PT_DTRACE; current->ptrace &= ~PT_DTRACE;
#ifdef SUBARCH_EXECVE1
SUBARCH_EXECVE1(&current->thread.regs.regs);
#endif
task_unlock(current); task_unlock(current);
set_cmdline(current_cmd()); set_cmdline(current_cmd());
} }
......
...@@ -31,7 +31,7 @@ int write_sigio_irq(int fd) ...@@ -31,7 +31,7 @@ int write_sigio_irq(int fd)
int err; int err;
err = um_request_irq(SIGIO_WRITE_IRQ, fd, IRQ_READ, sigio_interrupt, err = um_request_irq(SIGIO_WRITE_IRQ, fd, IRQ_READ, sigio_interrupt,
IRQF_DISABLED | IRQF_SAMPLE_RANDOM, "write sigio", IRQF_DISABLED|IRQF_SAMPLE_RANDOM, "write sigio",
NULL); NULL);
if(err){ if(err){
printk("write_sigio_irq : um_request_irq failed, err = %d\n", printk("write_sigio_irq : um_request_irq failed, err = %d\n",
......
...@@ -136,7 +136,7 @@ static int kern_do_signal(struct pt_regs *regs) ...@@ -136,7 +136,7 @@ static int kern_do_signal(struct pt_regs *regs)
PT_REGS_RESTART_SYSCALL(regs); PT_REGS_RESTART_SYSCALL(regs);
break; break;
case -ERESTART_RESTARTBLOCK: case -ERESTART_RESTARTBLOCK:
PT_REGS_SYSCALL_RET(regs) = __NR_restart_syscall; PT_REGS_ORIG_SYSCALL(regs) = __NR_restart_syscall;
PT_REGS_RESTART_SYSCALL(regs); PT_REGS_RESTART_SYSCALL(regs);
break; break;
} }
......
...@@ -110,7 +110,7 @@ long sys_uname(struct old_utsname __user * name) ...@@ -110,7 +110,7 @@ long sys_uname(struct old_utsname __user * name)
if (!name) if (!name)
return -EFAULT; return -EFAULT;
down_read(&uts_sem); down_read(&uts_sem);
err=copy_to_user(name, &system_utsname, sizeof (*name)); err = copy_to_user(name, utsname(), sizeof (*name));
up_read(&uts_sem); up_read(&uts_sem);
return err?-EFAULT:0; return err?-EFAULT:0;
} }
...@@ -126,21 +126,21 @@ long sys_olduname(struct oldold_utsname __user * name) ...@@ -126,21 +126,21 @@ long sys_olduname(struct oldold_utsname __user * name)
down_read(&uts_sem); down_read(&uts_sem);
error = __copy_to_user(&name->sysname,&system_utsname.sysname, error = __copy_to_user(&name->sysname, &utsname()->sysname,
__OLD_UTS_LEN); __OLD_UTS_LEN);
error |= __put_user(0,name->sysname+__OLD_UTS_LEN); error |= __put_user(0, name->sysname + __OLD_UTS_LEN);
error |= __copy_to_user(&name->nodename,&system_utsname.nodename, error |= __copy_to_user(&name->nodename, &utsname()->nodename,
__OLD_UTS_LEN); __OLD_UTS_LEN);
error |= __put_user(0,name->nodename+__OLD_UTS_LEN); error |= __put_user(0, name->nodename + __OLD_UTS_LEN);
error |= __copy_to_user(&name->release,&system_utsname.release, error |= __copy_to_user(&name->release, &utsname()->release,
__OLD_UTS_LEN); __OLD_UTS_LEN);
error |= __put_user(0,name->release+__OLD_UTS_LEN); error |= __put_user(0, name->release + __OLD_UTS_LEN);
error |= __copy_to_user(&name->version,&system_utsname.version, error |= __copy_to_user(&name->version, &utsname()->version,
__OLD_UTS_LEN); __OLD_UTS_LEN);
error |= __put_user(0,name->version+__OLD_UTS_LEN); error |= __put_user(0, name->version + __OLD_UTS_LEN);
error |= __copy_to_user(&name->machine,&system_utsname.machine, error |= __copy_to_user(&name->machine, &utsname()->machine,
__OLD_UTS_LEN); __OLD_UTS_LEN);
error |= __put_user(0,name->machine+__OLD_UTS_LEN); error |= __put_user(0, name->machine + __OLD_UTS_LEN);
up_read(&uts_sem); up_read(&uts_sem);
......
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