From: "K.Prasad" <prasad@linux.vnet.ibm.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Ingo Molnar <mingo@elte.hu>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Benjamin Herrenschmidt <benh@au1.ibm.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
maneesh@linux.vnet.ibm.com, Roland McGrath <roland@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [Patch 00/11] Hardware Breakpoint interfaces
Date: Fri, 24 Apr 2009 21:27:10 +0530 [thread overview]
Message-ID: <20090424155710.GA5008@in.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0904240959460.2894-100000@iolanthe.rowland.org>
On Fri, Apr 24, 2009 at 10:16:07AM -0400, Alan Stern wrote:
> On Fri, 24 Apr 2009, K.Prasad wrote:
>
> > The arch_update_kernel_hw_breakpoints() was designed to work like this -
> > it updates all registers beginning 'hbp_kernel_pos' to (HB_NUM - 1) with
> > the values stored in hbp_kernel[] array.
> >
> > When inserting a new breakpoint, hbp_kernel_pos is decremented *before*
> > invoking arch_update_kernel_hw_breakpoints() so that the new value is
> > also written onto the physical debug register.
> >
> > On removal, 'hbp_kernel_pos' is incremented *after*
> > arch_update_kernel_hw_breakpoints() so that the physical debug registers
> > i.e. both DR7 and DR<pos> are updated with the changes post removal and
> > compaction. I'm ready to make changes but don't see where the code
> > actually goes wrong. Can you explain that?
>
> I'm sorry; I misread the code in arch_update_kernel_hw_breakpoints().
> It isn't actually wrong, and you are correct to increment
> hbp_kernel_pos where you do. Your code is different from my original
> version, which would update all the debug registers at once instead of
> doing the kernel and userspace breakpoints separately -- that's what
> confused me.
>
> There is one change you could make to improve the routine, however. In
> arch_update_kernel_hw_breakpoints(), the line
>
> kdr7 &= ~kdr7_masks[hbp_kernel_pos];
>
> really should be
>
> kdr7 = 0;
>
> since kdr7 never contains anything other than kernel breakpoint
> settings. (You could update the comment in the preceding line as
> well.)
>
> Alan Stern
Sure, I'd make that change (in the subsequent iteration) - it's much simpler.
Do you think that the patchset is now in a form that can be submitted
for upstream (-tip tree) acceptance?
Thanks,
K.Prasad
next prev parent reply other threads:[~2009-04-24 15:57 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-07 6:34 [Patch 00/11] Hardware Breakpoint interfaces K.Prasad
2009-04-16 21:19 ` Alan Stern
2009-04-17 3:12 ` K.Prasad
2009-04-17 14:37 ` Alan Stern
2009-04-24 5:56 ` K.Prasad
2009-04-24 14:16 ` Alan Stern
2009-04-24 15:57 ` K.Prasad [this message]
2009-04-24 16:16 ` Alan Stern
-- strict thread matches above, loose matches on Subject: below --
2009-03-24 15:24 K.Prasad
2009-03-25 19:48 ` Alan Stern
2009-03-27 22:06 ` K.Prasad
2009-04-01 16:16 ` Alan Stern
2009-04-07 8:22 ` K.Prasad
2009-04-09 20:50 ` Alan Stern
2009-03-28 8:46 ` K.Prasad
2009-04-01 16:22 ` Alan Stern
2009-04-07 8:22 ` K.Prasad
2009-03-07 5:04 [Patch 00/11] Hardware Breakpoint Interfaces prasad
2009-03-05 4:37 [patch 00/11] Hardware Breakpoint interfaces prasad
2009-03-10 13:46 ` Ingo Molnar
2009-03-11 12:11 ` K.Prasad
2009-03-11 16:34 ` Alan Stern
2009-03-11 17:25 ` K.Prasad
2009-03-11 17:30 ` Ingo Molnar
2009-03-10 13:51 ` Ingo Molnar
2009-03-10 14:24 ` Alan Stern
2009-03-10 14:54 ` Ingo Molnar
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=20090424155710.GA5008@in.ibm.com \
--to=prasad@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=benh@au1.ibm.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maneesh@linux.vnet.ibm.com \
--cc=mingo@elte.hu \
--cc=roland@redhat.com \
--cc=rostedt@goodmis.org \
--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