From: "K.Prasad" <prasad@linux.vnet.ibm.com>
To: linuxppc-dev@ozlabs.org, David Gibson <dwg@au1.ibm.com>
Cc: paulus@samba.org, Michael Neuling <mikey@neuling.org>,
Benjamin Herrenschmidt <benh@au1.ibm.com>,
Alan Stern <stern@rowland.harvard.edu>,
Roland McGrath <roland@redhat.com>
Subject: Re: [Patch 1/6] Prepare the PowerPC platform for HW Breakpoint infrastructure
Date: Fri, 29 May 2009 15:23:33 +0530 [thread overview]
Message-ID: <20090529095333.GA7572@in.ibm.com> (raw)
In-Reply-To: <20090529032048.GB8621@yookeroo.seuss>
On Fri, May 29, 2009 at 01:20:48PM +1000, David Gibson wrote:
> On Mon, May 25, 2009 at 06:44:23AM +0530, K.Prasad wrote:
> > Prepare the PowerPC code for HW Breakpoint infrastructure patches by including
> > relevant constant definitions and function declarations.
> >
> > Signed-off-by: K.Prasad <prasad@linux.vnet.ibm.com>
> > ---
> > arch/powerpc/include/asm/hw_breakpoint.h | 57 +++++++++++++++++++++++++++++++
> > arch/powerpc/include/asm/processor.h | 1
> > arch/powerpc/include/asm/reg.h | 3 +
> > 3 files changed, 61 insertions(+)
> >
> > Index: linux-2.6-tip.hbkpt/arch/powerpc/include/asm/hw_breakpoint.h
> > ===================================================================
> > --- /dev/null
> > +++ linux-2.6-tip.hbkpt/arch/powerpc/include/asm/hw_breakpoint.h
> > @@ -0,0 +1,57 @@
> > +#ifndef _PPC64_HW_BREAKPOINT_H
> > +#define _PPC64_HW_BREAKPOINT_H
> > +
> > +#ifdef __KERNEL__
> > +#define __ARCH_HW_BREAKPOINT_H
> > +#ifdef CONFIG_PPC64
> > +
> > +struct arch_hw_breakpoint {
> > + char *name; /* Contains name of the symbol to set bkpt */
> > + unsigned long address;
> > + u8 type;
>
> You might as well make this an int, it will get padded out to 4 bytes
> long anyway.
>
Okay.
> > +};
> > +
> > +#include <linux/kdebug.h>
> > +#include <asm/reg.h>
> > +#include <asm-generic/hw_breakpoint.h>
> > +
> > +#define HW_BREAKPOINT_READ DABR_DATA_READ
> > +#define HW_BREAKPOINT_WRITE DABR_DATA_WRITE
> > +#define HW_BREAKPOINT_RW (DABR_DATA_READ | DABR_DATA_WRITE)
> > +
> > +#define HW_BREAKPOINT_ALIGN 0x7
> > +#define HW_BREAKPOINT_LEN INSTRUCTION_LEN
> > +
> > +extern struct hw_breakpoint *hbp_kernel[HBP_NUM];
> > +DECLARE_PER_CPU(struct hw_breakpoint*, this_hbp_kernel[HBP_NUM]);
> > +extern unsigned int hbp_user_refcount[HBP_NUM];
> > +
> > +extern void arch_install_thread_hw_breakpoint(struct task_struct *tsk);
> > +extern void arch_uninstall_thread_hw_breakpoint(void);
> > +extern int arch_validate_hwbkpt_settings(struct hw_breakpoint *bp,
> > + struct task_struct *tsk);
> > +extern void arch_update_user_hw_breakpoint(int pos, struct task_struct *tsk);
> > +extern void arch_flush_thread_hw_breakpoint(struct task_struct *tsk);
> > +extern void arch_update_kernel_hw_breakpoint(void *);
> > +extern int hw_breakpoint_exceptions_notify(struct notifier_block *unused,
> > + unsigned long val, void *data);
> > +
> > +extern void flush_thread_hw_breakpoint(struct task_struct *tsk);
> > +extern int copy_thread_hw_breakpoint(struct task_struct *tsk,
> > + struct task_struct *child, unsigned long clone_flags);
> > +extern void load_debug_registers(void );
>
> It looks as though a lot of these arch hooks ought to have prototypes
> in the generic part of the infrastructure.
>
As I said before, the signatures of some of these functions are
different. But I agree that we may want to eventually consolidate them
into the generic header file, during future enhancements.
Thanks,
K.Prasad
> --
> David Gibson | I'll have my music baroque, and my code
> david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
> | _way_ _around_!
> http://www.ozlabs.org/~dgibson
next prev parent reply other threads:[~2009-05-29 9:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090525004730.944465878@prasadkr_t60p.in.ibm.com>
2009-05-25 1:14 ` [Patch 1/6] Prepare the PowerPC platform for HW Breakpoint infrastructure K.Prasad
2009-05-29 3:20 ` David Gibson
2009-05-29 9:53 ` K.Prasad [this message]
2009-05-25 1:15 ` [Patch 2/6] Introduce PPC64 specific Hardware Breakpoint interfaces K.Prasad
2009-05-29 4:18 ` David Gibson
2009-05-29 13:54 ` K.Prasad
2009-05-25 1:16 ` [Patch 3/6] Modify ptrace code to use " K.Prasad
2009-05-25 1:16 ` [Patch 4/6] Modify process and processor handling code to recognise hardware debug registers K.Prasad
2009-05-29 4:29 ` David Gibson
2009-05-25 1:17 ` [Patch 5/6] Modify Data storage exception code to recognise DABR match first K.Prasad
2009-05-25 1:17 ` [Patch 6/6] Adapt kexec and samples code to recognise PPC64 hardware breakpoint usage K.Prasad
[not found] <20090603162741.197115376@prasadkr_t60p.in.ibm.com>
2009-06-03 16:34 ` [Patch 1/6] Prepare the PowerPC platform for HW Breakpoint infrastructure K.Prasad
[not found] <20090610090316.898961359@prasadkr_t60p.in.ibm.com>
2009-06-10 9:08 ` K.Prasad
[not found] <20090726235854.574539012@prasadkr_t60p.in.ibm.com>
2009-07-27 0:12 ` K.Prasad
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=20090529095333.GA7572@in.ibm.com \
--to=prasad@linux.vnet.ibm.com \
--cc=benh@au1.ibm.com \
--cc=dwg@au1.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mikey@neuling.org \
--cc=paulus@samba.org \
--cc=roland@redhat.com \
--cc=stern@rowland.harvard.edu \
/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;
as well as URLs for NNTP newsgroup(s).