diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-10-16 04:27:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:43:07 -0400 |
commit | f0c4cad99c12f08cb2a6cd0255911b2a93c57707 (patch) | |
tree | 1687ef2577bc7429955e8642fe8340ff2292817c /arch/um/os-Linux | |
parent | 54fa0ba40698af6d6735ade024293bb51cc4d4b3 (diff) |
uml: style fixes in FP code
Tidy the code affected by the floating point fixes.
A bunch of unused stuff is gone, including two sigcontext.c files,
which turned out to be entirely unneeded.
There are the usual fixes -
whitespace and style cleanups
copyright updates
emacs formatting comments gone
include cleanups
adding severities to printks
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/os-Linux')
-rw-r--r-- | arch/um/os-Linux/sys-i386/registers.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/arch/um/os-Linux/sys-i386/registers.c b/arch/um/os-Linux/sys-i386/registers.c index 8f1f0ab639b9..d1997ca76e5c 100644 --- a/arch/um/os-Linux/sys-i386/registers.c +++ b/arch/um/os-Linux/sys-i386/registers.c | |||
@@ -1,49 +1,55 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2004 PathScale, Inc | 2 | * Copyright (C) 2004 PathScale, Inc |
3 | * Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) | ||
3 | * Licensed under the GPL | 4 | * Licensed under the GPL |
4 | */ | 5 | */ |
5 | 6 | ||
6 | #include <errno.h> | 7 | #include <errno.h> |
7 | #include <sysdep/ptrace_user.h> | 8 | #include "kern_constants.h" |
8 | #include "longjmp.h" | 9 | #include "longjmp.h" |
9 | #include "user.h" | 10 | #include "user.h" |
11 | #include "sysdep/ptrace_user.h" | ||
10 | 12 | ||
11 | int save_fp_registers(int pid, unsigned long *fp_regs) | 13 | int save_fp_registers(int pid, unsigned long *fp_regs) |
12 | { | 14 | { |
13 | if(ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0) | 15 | if (ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0) |
14 | return -errno; | 16 | return -errno; |
15 | return 0; | 17 | return 0; |
16 | } | 18 | } |
17 | 19 | ||
18 | int restore_fp_registers(int pid, unsigned long *fp_regs) | 20 | int restore_fp_registers(int pid, unsigned long *fp_regs) |
19 | { | 21 | { |
20 | if(ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0) | 22 | if (ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0) |
21 | return -errno; | 23 | return -errno; |
22 | return 0; | 24 | return 0; |
23 | } | 25 | } |
24 | 26 | ||
25 | int save_fpx_registers(int pid, unsigned long *fp_regs) | 27 | int save_fpx_registers(int pid, unsigned long *fp_regs) |
26 | { | 28 | { |
27 | if(ptrace(PTRACE_GETFPXREGS, pid, 0, fp_regs) < 0) | 29 | if (ptrace(PTRACE_GETFPXREGS, pid, 0, fp_regs) < 0) |
28 | return -errno; | 30 | return -errno; |
29 | return 0; | 31 | return 0; |
30 | } | 32 | } |
31 | 33 | ||
32 | int restore_fpx_registers(int pid, unsigned long *fp_regs) | 34 | int restore_fpx_registers(int pid, unsigned long *fp_regs) |
33 | { | 35 | { |
34 | if(ptrace(PTRACE_SETFPXREGS, pid, 0, fp_regs) < 0) | 36 | if (ptrace(PTRACE_SETFPXREGS, pid, 0, fp_regs) < 0) |
35 | return -errno; | 37 | return -errno; |
36 | return 0; | 38 | return 0; |
37 | } | 39 | } |
38 | 40 | ||
39 | unsigned long get_thread_reg(int reg, jmp_buf *buf) | 41 | unsigned long get_thread_reg(int reg, jmp_buf *buf) |
40 | { | 42 | { |
41 | switch(reg){ | 43 | switch (reg) { |
42 | case EIP: return buf[0]->__eip; | 44 | case EIP: |
43 | case UESP: return buf[0]->__esp; | 45 | return buf[0]->__eip; |
44 | case EBP: return buf[0]->__ebp; | 46 | case UESP: |
47 | return buf[0]->__esp; | ||
48 | case EBP: | ||
49 | return buf[0]->__ebp; | ||
45 | default: | 50 | default: |
46 | printk("get_thread_regs - unknown register %d\n", reg); | 51 | printk(UM_KERN_ERR "get_thread_regs - unknown register %d\n", |
52 | reg); | ||
47 | return 0; | 53 | return 0; |
48 | } | 54 | } |
49 | } | 55 | } |