From d25f2e1235aab716c9fd6ba36c42503627a3a0e3 Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Mon, 4 Feb 2008 22:30:57 -0800 Subject: uml: use ptrace directly in libc code Some register accessor cleanups - userspace() was calling restore_registers and save_registers for no reason, since userspace() is on the libc side of the house, and these add no value over calling ptrace directly init_thread_registers and get_safe_registers were the same thing, so init_thread_registers is gone Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/os-Linux/registers.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'arch/um/os-Linux/registers.c') diff --git a/arch/um/os-Linux/registers.c b/arch/um/os-Linux/registers.c index a32ba6ab1211..c78fae3aba81 100644 --- a/arch/um/os-Linux/registers.c +++ b/arch/um/os-Linux/registers.c @@ -10,15 +10,6 @@ #include "sysdep/ptrace.h" #include "user.h" -/* This is set once at boot time and not changed thereafter */ - -static unsigned long exec_regs[MAX_REG_NR]; - -void init_thread_registers(struct uml_pt_regs *to) -{ - memcpy(to->gp, exec_regs, sizeof(to->gp)); -} - void save_registers(int pid, struct uml_pt_regs *regs) { int err; @@ -39,6 +30,10 @@ void restore_registers(int pid, struct uml_pt_regs *regs) "errno = %d\n", errno); } +/* This is set once at boot time and not changed thereafter */ + +static unsigned long exec_regs[MAX_REG_NR]; + void init_registers(int pid) { int err; -- cgit