|
@@ -222,13 +222,15 @@ void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p,
|
|
|
|
|
|
propagate_user_return_notify(prev_p, next_p);
|
|
propagate_user_return_notify(prev_p, next_p);
|
|
|
|
|
|
- if ((tifp ^ tifn) & _TIF_BLOCKSTEP) {
|
|
|
|
- unsigned long debugctl = get_debugctlmsr();
|
|
|
|
|
|
+ if ((tifp & _TIF_BLOCKSTEP || tifn & _TIF_BLOCKSTEP) &&
|
|
|
|
+ arch_has_block_step()) {
|
|
|
|
+ unsigned long debugctl, msk;
|
|
|
|
|
|
|
|
+ rdmsrl(MSR_IA32_DEBUGCTLMSR, debugctl);
|
|
debugctl &= ~DEBUGCTLMSR_BTF;
|
|
debugctl &= ~DEBUGCTLMSR_BTF;
|
|
- if (tifn & _TIF_BLOCKSTEP)
|
|
|
|
- debugctl |= DEBUGCTLMSR_BTF;
|
|
|
|
- update_debugctlmsr(debugctl);
|
|
|
|
|
|
+ msk = tifn & _TIF_BLOCKSTEP;
|
|
|
|
+ debugctl |= (msk >> TIF_BLOCKSTEP) << DEBUGCTLMSR_BTF_SHIFT;
|
|
|
|
+ wrmsrl(MSR_IA32_DEBUGCTLMSR, debugctl);
|
|
}
|
|
}
|
|
|
|
|
|
if ((tifp ^ tifn) & _TIF_NOTSC) {
|
|
if ((tifp ^ tifn) & _TIF_NOTSC) {
|