From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Chris Friesen <chris.friesen@genband.com>
Cc: Paul Mackerras <paulus@samba.org>, linuxppc-dev@lists.ozlabs.org
Subject: Re: questions around Book III-E and branch trace
Date: Thu, 18 Apr 2013 08:28:05 +0200 [thread overview]
Message-ID: <1366266485.24994.79.camel@pasglop> (raw)
In-Reply-To: <516EED8D.3040304@genband.com>
On Wed, 2013-04-17 at 12:44 -0600, Chris Friesen wrote:
> Hi,
>
> I'm trying to wrap my head around how linux handles branch tracing on
> Book III-E. I think I understand how we set MSR[DE] and DBCR0[IDM|BT],
> and how we handle fixing things up if an instruction being traced causes
> an exception.
That code is a mess and it wouldn't surprise me if it was broken...
At this point, the people who care the most about it are FSL, so
that's where you have the most chance to find a satisfactory answer.
Cheers,
Ben.
> I have a few questions though:
>
> 1) Does user_enable_block_step() have a bug in it? The current code has
>
> task->thread.dbcr0 = DBCR0_IDM | DBCR0_BT;
>
> Should that be as follows (to match the singel-step case)?
>
> task->thread.dbcr0 |= DBCR0_IDM | DBCR0_BT;
>
>
> 2) Why doesn't DBCR0_ACTIVE_EVENTS include DBCR0_BT?
>
>
> 3) In sys_debug_setcontext() why does SIG_DBG_BRANCH_TRACING return
> -EINVAL if CONFIG_PPC_ADV_DEBUG_REGS is set? Would it not be possible
> to use DBCR0_BT?
>
> Thanks,
> Chris
>
>
prev parent reply other threads:[~2013-04-18 6:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-17 18:44 questions around Book III-E and branch trace Chris Friesen
2013-04-17 23:30 ` BUG: branch trace support for 64-bit Book-E (was Re: questions around Book III-E and branch trace) Chris Friesen
2013-04-18 6:28 ` Benjamin Herrenschmidt [this message]
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=1366266485.24994.79.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=chris.friesen@genband.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.