SUPERH platform development
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH] sh: include: asm: include "linux/sched.h" in "ptrace.h"
Date: Wed, 31 Jul 2013 08:53:30 +0000	[thread overview]
Message-ID: <51F8D08A.8000502@asianux.com> (raw)

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

             reply	other threads:[~2013-07-31  8:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-31  8:53 Chen Gang [this message]
2013-07-31 10:03 ` [PATCH] sh: include: asm: include "linux/sched.h" in "ptrace.h" David Howells
2013-08-01  0:30 ` Chen Gang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51F8D08A.8000502@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=linux-sh@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox