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/sys-x86_64/signal.c | |
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/sys-x86_64/signal.c')
-rw-r--r-- | arch/um/sys-x86_64/signal.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c index a8e5fd7b2adb..1778d33808f4 100644 --- a/arch/um/sys-x86_64/signal.c +++ b/arch/um/sys-x86_64/signal.c | |||
@@ -1,5 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2003 PathScale, Inc. | 2 | * Copyright (C) 2003 PathScale, Inc. |
3 | * Copyright (C) 2003 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) | ||
3 | * Licensed under the GPL | 4 | * Licensed under the GPL |
4 | */ | 5 | */ |
5 | 6 | ||
@@ -110,7 +111,8 @@ static int copy_sc_to_user(struct sigcontext __user *to, | |||
110 | err |= PUTREG(regs, RDI, to, rdi); | 111 | err |= PUTREG(regs, RDI, to, rdi); |
111 | err |= PUTREG(regs, RSI, to, rsi); | 112 | err |= PUTREG(regs, RSI, to, rsi); |
112 | err |= PUTREG(regs, RBP, to, rbp); | 113 | err |= PUTREG(regs, RBP, to, rbp); |
113 | /* Must use orignal RSP, which is passed in, rather than what's in | 114 | /* |
115 | * Must use orignal RSP, which is passed in, rather than what's in | ||
114 | * the pt_regs, because that's already been updated to point at the | 116 | * the pt_regs, because that's already been updated to point at the |
115 | * signal frame. | 117 | * signal frame. |
116 | */ | 118 | */ |
@@ -152,7 +154,7 @@ static int copy_sc_to_user(struct sigcontext __user *to, | |||
152 | if (copy_to_user(to_fp, &fp, sizeof(struct user_i387_struct))) | 154 | if (copy_to_user(to_fp, &fp, sizeof(struct user_i387_struct))) |
153 | return 1; | 155 | return 1; |
154 | 156 | ||
155 | return(err); | 157 | return err; |
156 | } | 158 | } |
157 | 159 | ||
158 | struct rt_sigframe | 160 | struct rt_sigframe |
@@ -188,7 +190,8 @@ int setup_signal_stack_si(unsigned long stack_top, int sig, | |||
188 | goto out; | 190 | goto out; |
189 | } | 191 | } |
190 | 192 | ||
191 | /* Update SP now because the page fault handler refuses to extend | 193 | /* |
194 | * Update SP now because the page fault handler refuses to extend | ||
192 | * the stack if the faulting address is too far below the current | 195 | * the stack if the faulting address is too far below the current |
193 | * SP, which frame now certainly is. If there's an error, the original | 196 | * SP, which frame now certainly is. If there's an error, the original |
194 | * value is restored on the way out. | 197 | * value is restored on the way out. |
@@ -216,8 +219,10 @@ int setup_signal_stack_si(unsigned long stack_top, int sig, | |||
216 | err |= __copy_to_user(&frame->uc.uc_sigmask, set, | 219 | err |= __copy_to_user(&frame->uc.uc_sigmask, set, |
217 | sizeof(*set)); | 220 | sizeof(*set)); |
218 | 221 | ||
219 | /* Set up to return from userspace. If provided, use a stub | 222 | /* |
220 | already in userspace. */ | 223 | * Set up to return from userspace. If provided, use a stub |
224 | * already in userspace. | ||
225 | */ | ||
221 | /* x86-64 should always use SA_RESTORER. */ | 226 | /* x86-64 should always use SA_RESTORER. */ |
222 | if (ka->sa.sa_flags & SA_RESTORER) | 227 | if (ka->sa.sa_flags & SA_RESTORER) |
223 | err |= __put_user(ka->sa.sa_restorer, &frame->pretcode); | 228 | err |= __put_user(ka->sa.sa_restorer, &frame->pretcode); |
@@ -239,8 +244,10 @@ int setup_signal_stack_si(unsigned long stack_top, int sig, | |||
239 | /* In case the signal handler was declared without prototypes */ | 244 | /* In case the signal handler was declared without prototypes */ |
240 | PT_REGS_RAX(regs) = 0; | 245 | PT_REGS_RAX(regs) = 0; |
241 | 246 | ||
242 | /* This also works for non SA_SIGINFO handlers because they expect the | 247 | /* |
243 | next argument after the signal number on the stack. */ | 248 | * This also works for non SA_SIGINFO handlers because they expect the |
249 | * next argument after the signal number on the stack. | ||
250 | */ | ||
244 | PT_REGS_RSI(regs) = (unsigned long) &frame->info; | 251 | PT_REGS_RSI(regs) = (unsigned long) &frame->info; |
245 | PT_REGS_RDX(regs) = (unsigned long) &frame->uc; | 252 | PT_REGS_RDX(regs) = (unsigned long) &frame->uc; |
246 | PT_REGS_RIP(regs) = (unsigned long) ka->sa.sa_handler; | 253 | PT_REGS_RIP(regs) = (unsigned long) ka->sa.sa_handler; |
@@ -276,7 +283,7 @@ long sys_rt_sigreturn(struct pt_regs *regs) | |||
276 | 283 | ||
277 | /* Avoid ERESTART handling */ | 284 | /* Avoid ERESTART handling */ |
278 | PT_REGS_SYSCALL_NR(¤t->thread.regs) = -1; | 285 | PT_REGS_SYSCALL_NR(¤t->thread.regs) = -1; |
279 | return(PT_REGS_SYSCALL_RET(¤t->thread.regs)); | 286 | return PT_REGS_SYSCALL_RET(¤t->thread.regs); |
280 | 287 | ||
281 | segfault: | 288 | segfault: |
282 | force_sig(SIGSEGV, current); | 289 | force_sig(SIGSEGV, current); |