From: Chen Gang <gang.chen@asianux.com>
To: Yoshinori Sato <ysato@users.sourceforge.jp>,
Al Viro <viro@zeniv.linux.org.uk>,
Paul McKenney <paulmck@linux.vnet.ibm.com>,
"dhowells@redhat.com" <dhowells@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Michael Kerrisk <mtk.manpages@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] h8300: kernel: ptrace: remove redundancy default user_disable_single_step()
Date: Thu, 29 Aug 2013 12:08:21 +0800 [thread overview]
Message-ID: <521EC935.90200@asianux.com> (raw)
For platform h8300h and h8s, user_disable_single_step() is already
defined, it is conflict with the default one in h8300.
The public header already defined the default implementation, so in
h8300, need not define the default one.
The related error (defconfig for h8300h):
LD vmlinux.o
arch/h8300/platform/h8300h/built-in.o: In function `user_disable_single_step':
arch/h8300/platform/h8300h/ptrace_h8300h.c:65: multiple definition of `user_disable_single_step'
arch/h8300/kernel/built-in.o: arch/h8300/kernel/ptrace.c:39: first defined here
/usr/local/bin/h8300-gchen-elf-ld: Warning: size of symbol `_user_disable_single_step' changed from 2 in arch/h8300/kernel/built-in.o to 30 in arch/h8300/platform/h8300h/built-in.o
Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
arch/h8300/include/asm/ptrace.h | 2 ++
arch/h8300/kernel/ptrace.c | 5 -----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/h8300/include/asm/ptrace.h b/arch/h8300/include/asm/ptrace.h
index c1826b9..dd887e9 100644
--- a/arch/h8300/include/asm/ptrace.h
+++ b/arch/h8300/include/asm/ptrace.h
@@ -20,7 +20,9 @@
/* Find the stack offset for a register, relative to thread.esp0. */
#define PT_REG(reg) ((long)&((struct pt_regs *)0)->reg)
+#if defined(__H8300H__) || defined(__H8300S__)
#define arch_has_single_step() (1)
+#endif
#define user_mode(regs) (!((regs)->ccr & PS_S))
#define instruction_pointer(regs) ((regs)->pc)
diff --git a/arch/h8300/kernel/ptrace.c b/arch/h8300/kernel/ptrace.c
index 748cf65..82ec3b6 100644
--- a/arch/h8300/kernel/ptrace.c
+++ b/arch/h8300/kernel/ptrace.c
@@ -34,11 +34,6 @@
extern long h8300_get_reg(struct task_struct *task, int regno);
extern int h8300_put_reg(struct task_struct *task, int regno, unsigned long data);
-
-void user_disable_single_step(struct task_struct *child)
-{
-}
-
/*
* does not yet catch signals sent when the child dies.
* in exit.c or in signal.c.
--
1.7.7.6
next reply other threads:[~2013-08-29 4:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-29 4:08 Chen Gang [this message]
2013-08-29 4:15 ` [PATCH] arch/h8300/kernel/setup.c: implement default 'screen_info' Chen Gang
2013-08-29 4:23 ` [Suggestion] h8300: built-in: about "can not find built-in.o" issue Chen Gang
2013-08-29 4:25 ` 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=521EC935.90200@asianux.com \
--to=gang.chen@asianux.com \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=viro@zeniv.linux.org.uk \
--cc=ysato@users.sourceforge.jp \
/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