|
@@ -13,6 +13,7 @@
|
|
|
#include <asm/mce.h>
|
|
|
#include <asm/xcr.h>
|
|
|
#include <asm/suspend.h>
|
|
|
+#include <asm/debugreg.h>
|
|
|
|
|
|
static struct saved_context saved_context;
|
|
|
|
|
@@ -48,6 +49,7 @@ static void __save_processor_state(struct saved_context *ctxt)
|
|
|
ctxt->cr2 = read_cr2();
|
|
|
ctxt->cr3 = read_cr3();
|
|
|
ctxt->cr4 = read_cr4_safe();
|
|
|
+ hw_breakpoint_disable();
|
|
|
}
|
|
|
|
|
|
/* Needed by apm.c */
|
|
@@ -83,16 +85,7 @@ static void fix_processor_context(void)
|
|
|
/*
|
|
|
* Now maybe reload the debug registers
|
|
|
*/
|
|
|
- if (current->thread.debugreg7) {
|
|
|
- set_debugreg(current->thread.debugreg[0], 0);
|
|
|
- set_debugreg(current->thread.debugreg[1], 1);
|
|
|
- set_debugreg(current->thread.debugreg[2], 2);
|
|
|
- set_debugreg(current->thread.debugreg[3], 3);
|
|
|
- /* no 4 and 5 */
|
|
|
- set_debugreg(current->thread.debugreg6, 6);
|
|
|
- set_debugreg(current->thread.debugreg7, 7);
|
|
|
- }
|
|
|
-
|
|
|
+ load_debug_registers();
|
|
|
}
|
|
|
|
|
|
static void __restore_processor_state(struct saved_context *ctxt)
|