diff mbox

sh: Fix build arch_ptrace function by init_fpu

Message ID 1301398619-10753-1-git-send-email-iwamatsu@nigauri.org (mailing list archive)
State Rejected
Headers show

Commit Message

Nobuhiro Iwamatsu March 29, 2011, 11:36 a.m. UTC
None
diff mbox

Patch

diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
index 2130ca6..e00ddad 100644
--- a/arch/sh/kernel/ptrace_32.c
+++ b/arch/sh/kernel/ptrace_32.c
@@ -394,9 +394,11 @@  long arch_ptrace(struct task_struct *child, long request,
 					tmp = 0;
 			} else {
 				unsigned long index;
+#ifdef CONFIG_SH_FPU
 				ret = init_fpu(child);
 				if (ret)
 					break;
+#endif
 				index = addr - offsetof(struct user, fpu);
 				tmp = ((unsigned long *)child->thread.xstate)
 					[index >> 2];
@@ -428,9 +430,11 @@  long arch_ptrace(struct task_struct *child, long request,
 		else if (addr >= offsetof(struct user, fpu) &&
 			 addr < offsetof(struct user, u_fpvalid)) {
 			unsigned long index;
+#ifdef CONFIG_SH_FPU
 			ret = init_fpu(child);
 			if (ret)
 				break;
+#endif
 			index = addr - offsetof(struct user, fpu);
 			set_stopped_child_used_math(child);
 			((unsigned long *)child->thread.xstate)
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c
index c8f9764..d675b0e 100644
--- a/arch/sh/kernel/ptrace_64.c
+++ b/arch/sh/kernel/ptrace_64.c
@@ -403,9 +403,11 @@  long arch_ptrace(struct task_struct *child, long request,
 		else if ((addr >= offsetof(struct user, fpu)) &&
 			 (addr <  offsetof(struct user, u_fpvalid))) {
 			unsigned long index;
+#ifdef CONFIG_SH_FPU
 			ret = init_fpu(child);
 			if (ret)
 				break;
+#endif
 			index = addr - offsetof(struct user, fpu);
 			tmp = get_fpu_long(child, index);
 		} else if (addr == offsetof(struct user, u_fpvalid)) {
@@ -445,9 +447,11 @@  long arch_ptrace(struct task_struct *child, long request,
 		else if ((addr >= offsetof(struct user, fpu)) &&
 			 (addr <  offsetof(struct user, u_fpvalid))) {
 			unsigned long index;
+#ifdef CONFIG_SH_FPU
 			ret = init_fpu(child);
 			if (ret)
 				break;
+#endif
 			index = addr - offsetof(struct user, fpu);
 			ret = put_fpu_long(child, index, data);
 		}