aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2010-07-12 19:59:15 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2010-07-12 19:59:15 +0000
commitaaa95ccb5067bca6dee8c7f66933b56072b58132 (patch)
tree3569dff85433762dac57a5ef9a8e7c3b8cc6cdbf
parenta32e2a86af600573694a6fbab895ee800f3ab737 (diff)
downloadsrc-aaa95ccb5067bca6dee8c7f66933b56072b58132.tar.gz
src-aaa95ccb5067bca6dee8c7f66933b56072b58132.zip
When switching the thread from the processor, store %dr7 content
into the pcb before disabling watchpoints. Otherwise, when the thread is restored on a processor, watchpoints are still disabled. Submitted by: Tijl Coosemans <tijl coosemans org> (I would be much happier if Tijl commited this himself) MFC after: 1 week
Notes
Notes: svn path=/head/; revision=209955
-rw-r--r--sys/amd64/amd64/cpu_switch.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S
index cfb4204f9568..6b5c6632fbb2 100644
--- a/sys/amd64/amd64/cpu_switch.S
+++ b/sys/amd64/amd64/cpu_switch.S
@@ -243,13 +243,13 @@ store_dr:
movq %dr2,%r13
movq %dr3,%r12
movq %dr6,%r11
- andq $0x0000fc00, %rax /* disable all watchpoints */
movq %r15,PCB_DR0(%r8)
movq %r14,PCB_DR1(%r8)
movq %r13,PCB_DR2(%r8)
movq %r12,PCB_DR3(%r8)
movq %r11,PCB_DR6(%r8)
movq %rax,PCB_DR7(%r8)
+ andq $0x0000fc00, %rax /* disable all watchpoints */
movq %rax,%dr7
jmp done_store_dr