summaryrefslogtreecommitdiff
path: root/arch/x86/mm
diff options
context:
space:
mode:
authorLuca Barbieri <luca@luca-barbieri.com>2010-01-16 10:39:30 +0100
committerIngo Molnar <mingo@elte.hu>2010-01-17 08:01:44 +0100
commit0bb7a95f5455cd87e6a69e5818bc1f509a98d187 (patch)
tree23c3e35c8300fc07d469a1875daf0be29cc37588 /arch/x86/mm
parent8f06d7e6e1bbfb32698d6d455583ab7460c090e2 (diff)
downloadlinux-rpi3-0bb7a95f5455cd87e6a69e5818bc1f509a98d187.tar.gz
linux-rpi3-0bb7a95f5455cd87e6a69e5818bc1f509a98d187.tar.bz2
linux-rpi3-0bb7a95f5455cd87e6a69e5818bc1f509a98d187.zip
hw-breakpoints, perf: Fix broken mmiotrace due to dr6 by reference change
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. Signed-off-by: Luca Barbieri <luca@luca-barbieri.com> Acked-by: K.Prasad <prasad@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <1263634770-14578-1-git-send-email-luca@luca-barbieri.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/kmmio.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/mm/kmmio.c b/arch/x86/mm/kmmio.c
index c0f6198565eb..536fb6823366 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;
}