aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/sys-x86_64/signal.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-10-16 04:26:58 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:05 -0400
commit77bf4400319db9d2a8af6b00c2be6faa0f3d07cb (patch)
treeddc8fd48349b8d4dd2c0b26bce7f52f79b4e4077 /arch/um/sys-x86_64/signal.c
parentae2587e41254e48e670346aefa332d7469d86352 (diff)
uml: remove code made redundant by CHOOSE_MODE removal
This patch makes a number of simplifications enabled by the removal of CHOOSE_MODE. There were lots of functions that looked like int foo(args){ foo_skas(args); } The bodies of foo_skas are now folded into foo, and their declarations (and sometimes entire header files) are deleted. In addition, the union uml_pt_regs, which was a union between the tt and skas register formats, is now a struct, with the tt-mode arm of the union being removed. It turns out that usr2_handler was unused, so it is gone. 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/sys-x86_64/signal.c')
-rw-r--r--arch/um/sys-x86_64/signal.c35
1 files changed, 9 insertions, 26 deletions
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c
index 2d6cdd260c26..a06d66d0c409 100644
--- a/arch/um/sys-x86_64/signal.c
+++ b/arch/um/sys-x86_64/signal.c
@@ -16,12 +16,12 @@
16#include "frame_kern.h" 16#include "frame_kern.h"
17#include "skas.h" 17#include "skas.h"
18 18
19void copy_sc(union uml_pt_regs *regs, void *from) 19void copy_sc(struct uml_pt_regs *regs, void *from)
20{ 20{
21 struct sigcontext *sc = from; 21 struct sigcontext *sc = from;
22 22
23#define GETREG(regs, regno, sc, regname) \ 23#define GETREG(regs, regno, sc, regname) \
24 (regs)->skas.regs[(regno) / sizeof(unsigned long)] = (sc)->regname 24 (regs)->regs[(regno) / sizeof(unsigned long)] = (sc)->regname
25 25
26 GETREG(regs, R8, sc, r8); 26 GETREG(regs, R8, sc, r8);
27 GETREG(regs, R9, sc, r9); 27 GETREG(regs, R9, sc, r9);
@@ -46,13 +46,13 @@ void copy_sc(union uml_pt_regs *regs, void *from)
46#undef GETREG 46#undef GETREG
47} 47}
48 48
49static int copy_sc_from_user_skas(struct pt_regs *regs, 49static int copy_sc_from_user(struct pt_regs *regs,
50 struct sigcontext __user *from) 50 struct sigcontext __user *from)
51{ 51{
52 int err = 0; 52 int err = 0;
53 53
54#define GETREG(regs, regno, sc, regname) \ 54#define GETREG(regs, regno, sc, regname) \
55 __get_user((regs)->regs.skas.regs[(regno) / sizeof(unsigned long)], \ 55 __get_user((regs)->regs.regs[(regno) / sizeof(unsigned long)], \
56 &(sc)->regname) 56 &(sc)->regname)
57 57
58 err |= GETREG(regs, R8, from, r8); 58 err |= GETREG(regs, R8, from, r8);
@@ -80,10 +80,9 @@ static int copy_sc_from_user_skas(struct pt_regs *regs,
80 return err; 80 return err;
81} 81}
82 82
83int copy_sc_to_user_skas(struct sigcontext __user *to, 83static int copy_sc_to_user(struct sigcontext __user *to,
84 struct _fpstate __user *to_fp, 84 struct _fpstate __user *to_fp, struct pt_regs *regs,
85 struct pt_regs *regs, unsigned long mask, 85 unsigned long mask, unsigned long sp)
86 unsigned long sp)
87{ 86{
88 struct faultinfo * fi = &current->thread.arch.faultinfo; 87 struct faultinfo * fi = &current->thread.arch.faultinfo;
89 int err = 0; 88 int err = 0;
@@ -92,7 +91,7 @@ int copy_sc_to_user_skas(struct sigcontext __user *to,
92 err |= __put_user(0, &to->fs); 91 err |= __put_user(0, &to->fs);
93 92
94#define PUTREG(regs, regno, sc, regname) \ 93#define PUTREG(regs, regno, sc, regname) \
95 __put_user((regs)->regs.skas.regs[(regno) / sizeof(unsigned long)], \ 94 __put_user((regs)->regs.regs[(regno) / sizeof(unsigned long)], \
96 &(sc)->regname) 95 &(sc)->regname)
97 96
98 err |= PUTREG(regs, RDI, to, rdi); 97 err |= PUTREG(regs, RDI, to, rdi);
@@ -130,22 +129,6 @@ int copy_sc_to_user_skas(struct sigcontext __user *to,
130 return(err); 129 return(err);
131} 130}
132 131
133static int copy_sc_from_user(struct pt_regs *to, void __user *from)
134{
135 int ret;
136
137 ret = copy_sc_from_user_skas(to, from);
138 return(ret);
139}
140
141static int copy_sc_to_user(struct sigcontext __user *to,
142 struct _fpstate __user *fp,
143 struct pt_regs *from, unsigned long mask,
144 unsigned long sp)
145{
146 return copy_sc_to_user_skas(to, fp, from, mask, sp);
147}
148
149struct rt_sigframe 132struct rt_sigframe
150{ 133{
151 char __user *pretcode; 134 char __user *pretcode;