summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-10-16 01:27:16 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 09:43:07 -0700
commite8012b584fac3a1bb70cd896612c12086d28e9ff (patch)
tree0ec406be2ad1878b601c6e97ad6216764ddae942 /include
parenta5f6096c805e6d2fa03ee932f8c70af34cee41a0 (diff)
downloadop-kernel-dev-e8012b584fac3a1bb70cd896612c12086d28e9ff.zip
op-kernel-dev-e8012b584fac3a1bb70cd896612c12086d28e9ff.tar.gz
uml: ptrace floating point fixes
Handle floating point state better in ptrace. The code now correctly distinguishes between PTRACE_[GS]ETFPREGS and PTRACE_[GS]ETFPXREGS. The FPX requests get handed off to arch-specific code because that's not generic. get_fpregs, set_fpregs, set_fpregs, and set_fpxregs needed real implementations. Something here exposed a missing include in asm/page.h, which needed linux/types.h in order to get gfp_t, so that's fixed here. 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 'include')
-rw-r--r--include/asm-um/page.h1
-rw-r--r--include/asm-um/ptrace-generic.h11
-rw-r--r--include/asm-um/ptrace-i386.h6
3 files changed, 14 insertions, 4 deletions
diff --git a/include/asm-um/page.h b/include/asm-um/page.h
index 8e310d8..4b424c7 100644
--- a/include/asm-um/page.h
+++ b/include/asm-um/page.h
@@ -9,6 +9,7 @@
struct page;
+#include <linux/types.h>
#include <asm/vm-flags.h>
/* PAGE_SHIFT determines the page size */
diff --git a/include/asm-um/ptrace-generic.h b/include/asm-um/ptrace-generic.h
index 919581d..6aefcd3 100644
--- a/include/asm-um/ptrace-generic.h
+++ b/include/asm-um/ptrace-generic.h
@@ -9,6 +9,7 @@
#ifndef __ASSEMBLY__
#include "asm/arch/ptrace-abi.h"
+#include <asm/user.h>
#include "sysdep/ptrace.h"
struct pt_regs {
@@ -35,12 +36,14 @@ struct pt_regs {
struct task_struct;
+extern long subarch_ptrace(struct task_struct *child, long request, long addr,
+ long data);
extern unsigned long getreg(struct task_struct *child, int regno);
extern int putreg(struct task_struct *child, int regno, unsigned long value);
-extern int get_fpregs(unsigned long buf, struct task_struct *child);
-extern int set_fpregs(unsigned long buf, struct task_struct *child);
-extern int get_fpxregs(unsigned long buf, struct task_struct *child);
-extern int set_fpxregs(unsigned long buf, struct task_struct *tsk);
+extern int get_fpregs(struct user_i387_struct __user *buf,
+ struct task_struct *child);
+extern int set_fpregs(struct user_i387_struct __user *buf,
+ struct task_struct *child);
extern void show_regs(struct pt_regs *regs);
diff --git a/include/asm-um/ptrace-i386.h b/include/asm-um/ptrace-i386.h
index 65102c8..b2d24c5e 100644
--- a/include/asm-um/ptrace-i386.h
+++ b/include/asm-um/ptrace-i386.h
@@ -10,6 +10,7 @@
#include "linux/compiler.h"
#include "asm/ptrace-generic.h"
+#include <asm/user.h>
#include "sysdep/ptrace.h"
#define PT_REGS_EAX(r) UPT_EAX(&(r)->regs)
@@ -45,6 +46,11 @@
*/
struct user_desc;
+extern int get_fpxregs(struct user_fxsr_struct __user *buf,
+ struct task_struct *child);
+extern int set_fpxregs(struct user_fxsr_struct __user *buf,
+ struct task_struct *tsk);
+
extern int ptrace_get_thread_area(struct task_struct *child, int idx,
struct user_desc __user *user_desc);
OpenPOWER on IntegriCloud