|
@@ -140,6 +140,9 @@ static int enable_single_step(struct task_struct *child)
|
|
*/
|
|
*/
|
|
static void write_debugctlmsr(struct task_struct *child, unsigned long val)
|
|
static void write_debugctlmsr(struct task_struct *child, unsigned long val)
|
|
{
|
|
{
|
|
|
|
+ if (child->thread.debugctlmsr == val)
|
|
|
|
+ return;
|
|
|
|
+
|
|
child->thread.debugctlmsr = val;
|
|
child->thread.debugctlmsr = val;
|
|
|
|
|
|
if (child != current)
|
|
if (child != current)
|
|
@@ -165,11 +168,11 @@ static void enable_step(struct task_struct *child, bool block)
|
|
write_debugctlmsr(child,
|
|
write_debugctlmsr(child,
|
|
child->thread.debugctlmsr | DEBUGCTLMSR_BTF);
|
|
child->thread.debugctlmsr | DEBUGCTLMSR_BTF);
|
|
} else {
|
|
} 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);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|