linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Michael Neuling <mikey@neuling.org>
Cc: Thiago Jung Bauermann <bauerman@br.ibm.com>,
	Dave Kleikamp <shaggy@linux.vnet.ibm.com>,
	David Gibson <dwg@au1.ibm.com>,
	linuxppc-dev list <Linuxppc-dev@ozlabs.org>,
	Torez Smith <torez@us.ibm.com>,
	Sergio Durigan Junior <sergiodj@br.ibm.com>
Subject: Re: [RFC:PATCH 01/03] powerpc: Extended ptrace interface
Date: Mon, 01 Feb 2010 16:08:04 +1100	[thread overview]
Message-ID: <1265000884.8287.28.camel@pasglop> (raw)
In-Reply-To: <14701.1264042076@neuling.org>

On Thu, 2010-01-21 at 15:47 +1300, Michael Neuling wrote:
> > powerpc: Extended ptrace interface

> > +static long ppc_set_hwdebug(struct task_struct *child,
> > +		     struct ppc_hw_breakpoint *bp_info)
> > +{
> > +	/*
> > +	 * We currently support one data breakpoint
> > +	 */
> > +	if (((bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_RW) == 0) ||
> > +	    ((bp_info->trigger_type & ~PPC_BREAKPOINT_TRIGGER_RW) != 0) ||
> > +	    (bp_info->trigger_type != PPC_BREAKPOINT_TRIGGER_WRITE) ||
> > +	    (bp_info->addr_mode != PPC_BREAKPOINT_MODE_EXACT) ||
> > +	    (bp_info->condition_mode != PPC_BREAKPOINT_CONDITION_NONE))
> > +		return -EINVAL;
> > +
> > +	if (child->thread.dabr)
> > +		return -ENOSPC;
> > +
> > +	if ((unsigned long)bp_info->addr >= TASK_SIZE)
> > +		return -EIO;
> > +
> > +	child->thread.dabr = (unsigned long)bp_info->addr;
> > +#ifdef CONFIG_BOOKE
> 
> Do we want to add these CONFIG_BOOKE into a ppc_md call, so different
> CPU typs can have different setups?  I could see other CPUs might need
> to do different stuff here and we end up in #ifdef chaos

Actually, I don't think we need that level of indirection just now. If
there's ever a need for more ifdef's then ok, but the BookE debug
facility is somewhat architected so I wouldn't expect that much new
stuff.

Cheers,
Ben.

  reply	other threads:[~2010-02-01  5:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-18 21:57 [RFC:PATCH 00/03] powerpc: Expose BookE debug registers through extended ptrace interface Dave Kleikamp
2010-01-18 21:57 ` [RFC:PATCH 01/03] powerpc: Extended " Dave Kleikamp
2010-01-21  2:47   ` Michael Neuling
2010-02-01  5:08     ` Benjamin Herrenschmidt [this message]
2010-01-18 21:57 ` [RFC:PATCH 03/03] powerpc: Add support for BookE Debug Reg. traps, exceptions and ptrace Dave Kleikamp
2010-01-18 21:59 ` [RFC:PATCH 02/03] powerpc: Add definitions for Debug Registers on BookE Platforms Dave Kleikamp
  -- strict thread matches above, loose matches on Subject: below --
2009-12-10 15:57 [RFC:PATCH 00/03] powerpc: Expose BookE debug registers through extended ptrace interface Dave Kleikamp
2009-12-10 15:57 ` [RFC:PATCH 01/03] powerpc: Extended " Dave Kleikamp
2009-12-11  0:44   ` David Gibson
2009-12-11  2:51   ` Kumar Gala

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=1265000884.8287.28.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=Linuxppc-dev@ozlabs.org \
    --cc=bauerman@br.ibm.com \
    --cc=dwg@au1.ibm.com \
    --cc=mikey@neuling.org \
    --cc=sergiodj@br.ibm.com \
    --cc=shaggy@linux.vnet.ibm.com \
    --cc=torez@us.ibm.com \
    /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).