diff options
author | jhb <jhb@FreeBSD.org> | 2005-01-14 20:16:41 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-01-14 20:16:41 +0000 |
commit | 89117798073aab561c965f74c682cc9edd8fced1 (patch) | |
tree | 63f4ab2ce0ac64edd46131ec99c3fa315b1a6ac9 /sys | |
parent | a8f8001b386fe2eeb885121ae0f2b748ddf8e1f7 (diff) | |
download | FreeBSD-src-89117798073aab561c965f74c682cc9edd8fced1.zip FreeBSD-src-89117798073aab561c965f74c682cc9edd8fced1.tar.gz |
Remove redundant code to drop per-thread debug register state from
cpu_exit() as this is already performed in cpu_thread_exit() and the
debug state is per-thread rather than per-process.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/vm_machdep.c | 7 | ||||
-rw-r--r-- | sys/i386/i386/vm_machdep.c | 8 |
2 files changed, 1 insertions, 14 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index b144dfb..d784d02 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -185,13 +185,6 @@ cpu_set_fork_handler(td, func, arg) void cpu_exit(struct thread *td) { - struct pcb *pcb = td->td_pcb; - - if (pcb->pcb_flags & PCB_DBREGS) { - /* disable all hardware breakpoints */ - reset_dbregs(); - pcb->pcb_flags &= ~PCB_DBREGS; - } } void diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index cc98727..1b002dc 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -291,8 +291,6 @@ void cpu_exit(struct thread *td) { struct mdproc *mdp; - struct pcb *pcb = td->td_pcb; - /* Reset pc->pcb_gs and %gs before possibly invalidating it. */ mdp = &td->td_proc->p_md; @@ -301,17 +299,13 @@ cpu_exit(struct thread *td) load_gs(_udatasel); user_ldt_free(td); } - if (pcb->pcb_flags & PCB_DBREGS) { - /* disable all hardware breakpoints */ - reset_dbregs(); - pcb->pcb_flags &= ~PCB_DBREGS; - } } void cpu_thread_exit(struct thread *td) { struct pcb *pcb = td->td_pcb; + #ifdef DEV_NPX if (td == PCPU_GET(fpcurthread)) npxdrop(); |