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>
This commit is contained in:
Jeff Dike
2007-10-16 01:27:18 -07:00
committed by Linus Torvalds
parent 54fa0ba406
commit f0c4cad99c
11 changed files with 76 additions and 247 deletions

View File

@@ -1,49 +1,55 @@
/*
* Copyright (C) 2004 PathScale, Inc
* Copyright (C) 2004 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/
#include <errno.h>
#include <sysdep/ptrace_user.h>
#include "kern_constants.h"
#include "longjmp.h"
#include "user.h"
#include "sysdep/ptrace_user.h"
int save_fp_registers(int pid, unsigned long *fp_regs)
{
if(ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0)
if (ptrace(PTRACE_GETFPREGS, pid, 0, fp_regs) < 0)
return -errno;
return 0;
}
int restore_fp_registers(int pid, unsigned long *fp_regs)
{
if(ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0)
if (ptrace(PTRACE_SETFPREGS, pid, 0, fp_regs) < 0)
return -errno;
return 0;
}
int save_fpx_registers(int pid, unsigned long *fp_regs)
{
if(ptrace(PTRACE_GETFPXREGS, pid, 0, fp_regs) < 0)
if (ptrace(PTRACE_GETFPXREGS, pid, 0, fp_regs) < 0)
return -errno;
return 0;
}
int restore_fpx_registers(int pid, unsigned long *fp_regs)
{
if(ptrace(PTRACE_SETFPXREGS, pid, 0, fp_regs) < 0)
if (ptrace(PTRACE_SETFPXREGS, pid, 0, fp_regs) < 0)
return -errno;
return 0;
}
unsigned long get_thread_reg(int reg, jmp_buf *buf)
{
switch(reg){
case EIP: return buf[0]->__eip;
case UESP: return buf[0]->__esp;
case EBP: return buf[0]->__ebp;
switch (reg) {
case EIP:
return buf[0]->__eip;
case UESP:
return buf[0]->__esp;
case EBP:
return buf[0]->__ebp;
default:
printk("get_thread_regs - unknown register %d\n", reg);
printk(UM_KERN_ERR "get_thread_regs - unknown register %d\n",
reg);
return 0;
}
}