SUPERH platform development
 help / color / mirror / Atom feed
* [PATCH] sh: include: asm: include "linux/sched.h" in "ptrace.h"
@ 2013-07-31  8:53 Chen Gang
  2013-07-31 10:03 ` David Howells
  2013-08-01  0:30 ` Chen Gang
  0 siblings, 2 replies; 3+ messages in thread
From: Chen Gang @ 2013-07-31  8:53 UTC (permalink / raw)
  To: linux-sh

Need include "linux/sched.h" in "ptrace.h", or 'allmodconfig' can not

pass compiling.

The relate error:

    CC      arch/sh/kernel/kgdb.o
  In file included from /root/linux-next/arch/sh/include/asm/kgdb.h:5:0,
                   from include/linux/kgdb.h:20,
                   from arch/sh/kernel/kgdb.c:12:
  arch/sh/kernel/kgdb.c: In function 'sleeping_thread_to_gdb_regs':
  arch/sh/include/asm/ptrace.h:103:11: error: implicit declaration of function 'task_stack_page' [-Werror=implicit-function-declaration]
    ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE) - 1)
             ^
  arch/sh/kernel/kgdb.c:225:32: note: in expansion of macro 'task_pt_regs'
    struct pt_regs *thread_regs = task_pt_regs(p);
                                  ^
  arch/sh/kernel/kgdb.c:242:23: error: dereferencing pointer to incomplete type
    gdb_regs[GDB_R15] = p->thread.sp;
                         ^
  arch/sh/kernel/kgdb.c:243:22: error: dereferencing pointer to incomplete type
    gdb_regs[GDB_PC] = p->thread.pc;
                        ^
  arch/sh/kernel/kgdb.c: In function 'singlestep_trap_handler':
  arch/sh/kernel/kgdb.c:310:27: error: 'SIGTRAP' undeclared (first use in this function)
    kgdb_handle_exception(0, SIGTRAP, 0, regs);
                             ^
  arch/sh/kernel/kgdb.c:310:27: note: each undeclared identifier is reported only once for each function it appears in


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 arch/sh/include/asm/ptrace.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/sh/include/asm/ptrace.h b/arch/sh/include/asm/ptrace.h
index 2506c7d..b5784f9 100644
--- a/arch/sh/include/asm/ptrace.h
+++ b/arch/sh/include/asm/ptrace.h
@@ -11,6 +11,7 @@
 #include <asm/addrspace.h>
 #include <asm/page.h>
 #include <uapi/asm/ptrace.h>
+#include <linux/sched.h>
 
 #define user_mode(regs)			(((regs)->sr & 0x40000000)=0)
 #define kernel_stack_pointer(_regs)	((unsigned long)(_regs)->regs[15])
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-08-01  0:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-31  8:53 [PATCH] sh: include: asm: include "linux/sched.h" in "ptrace.h" Chen Gang
2013-07-31 10:03 ` David Howells
2013-08-01  0:30 ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox