From 30a55885c42a68ee259aff3a64a7d18e072b948c Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 3 Apr 2008 14:18:55 -0700 Subject: [PATCH] --- yaml --- r: 88128 b: refs/heads/master c: 4ba51fd75cc3789be83f0d6f878dabbb0cb19bca h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/step.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 6f8f47d2a5e6..e7cac8fdd992 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2eccd6f65a0d4844318b1e30755cafd063833908 +refs/heads/master: 4ba51fd75cc3789be83f0d6f878dabbb0cb19bca diff --git a/trunk/arch/x86/kernel/step.c b/trunk/arch/x86/kernel/step.c index 9d406cdc847f..071ff4798236 100644 --- a/trunk/arch/x86/kernel/step.c +++ b/trunk/arch/x86/kernel/step.c @@ -140,6 +140,9 @@ static int enable_single_step(struct task_struct *child) */ static void write_debugctlmsr(struct task_struct *child, unsigned long val) { + if (child->thread.debugctlmsr == val) + return; + child->thread.debugctlmsr = val; if (child != current) @@ -165,11 +168,11 @@ static void enable_step(struct task_struct *child, bool block) write_debugctlmsr(child, child->thread.debugctlmsr | DEBUGCTLMSR_BTF); } else { - write_debugctlmsr(child, - child->thread.debugctlmsr & ~DEBUGCTLMSR_BTF); + write_debugctlmsr(child, + child->thread.debugctlmsr & ~DEBUGCTLMSR_BTF); - if (!child->thread.debugctlmsr) - clear_tsk_thread_flag(child, TIF_DEBUGCTLMSR); + if (!child->thread.debugctlmsr) + clear_tsk_thread_flag(child, TIF_DEBUGCTLMSR); } }