From: Luca Barbieri <luca@luca-barbieri.com>
To: Ingo Molnar <mingo@redhat.com>
Cc: "K.Prasad" <prasad@linux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
linux-kernel@vger.kernel.org,
Luca Barbieri <luca@luca-barbieri.com>
Subject: [PATCH] Fix broken mmiotrace due to dr6 by reference change
Date: Sat, 16 Jan 2010 10:39:30 +0100 [thread overview]
Message-ID: <1263634770-14578-1-git-send-email-luca@luca-barbieri.com> (raw)
Commit 62edab9056a6cf0c9207339c8892c923a5217e45 (from June 2009 but merged
in 2.6.33) changes notify_die to pass dr6 by reference.
However, it forgets to fix the check for DR_STEP in kmmio.c, breaking
mmiotrace. It also passes a wrong value to the post handler.
This simple fix makes mmiotrace work again.
Please send to Linus for inclusion in 2.6.33
Signed-off-by: Luca Barbieri <luca@luca-barbieri.com>
---
arch/x86/mm/kmmio.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c
index c0f6198..536fb68 100644
--- a/arch/x86/mm/kmmio.c
+++ b/arch/x86/mm/kmmio.c
@@ -538,14 +538,15 @@ static int
kmmio_die_notifier(struct notifier_block *nb, unsigned long val, void *args)
{
struct die_args *arg = args;
+ unsigned long* dr6_p = (unsigned long *)ERR_PTR(arg->err);
- if (val == DIE_DEBUG && (arg->err & DR_STEP))
- if (post_kmmio_handler(arg->err, arg->regs) == 1) {
+ if (val == DIE_DEBUG && (*dr6_p & DR_STEP))
+ if (post_kmmio_handler(*dr6_p, arg->regs) == 1) {
/*
* Reset the BS bit in dr6 (pointed by args->err) to
* denote completion of processing
*/
- (*(unsigned long *)ERR_PTR(arg->err)) &= ~DR_STEP;
+ *dr6_p &= ~DR_STEP;
return NOTIFY_STOP;
}
--
1.6.3.3
next reply other threads:[~2010-01-16 9:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-16 9:39 Luca Barbieri [this message]
2010-01-16 19:58 ` K.Prasad
2010-01-16 20:29 ` Luca Barbieri
2010-01-17 18:30 ` [tip:perf/urgent] hw-breakpoints, perf: " tip-bot for Luca Barbieri
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=1263634770-14578-1-git-send-email-luca@luca-barbieri.com \
--to=luca@luca-barbieri.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=prasad@linux.vnet.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
all inboxes | Powered by JetHome®