diff options
author | kib <kib@FreeBSD.org> | 2012-07-26 09:11:37 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2012-07-26 09:11:37 +0000 |
commit | d3fc8e917d0e4229d20c4bce04b682b3710fd2dc (patch) | |
tree | 4905b5e976c538af72794522c674885170a7e457 /sys/i386/i386/trap.c | |
parent | 4f8212948b54915e36ecbd960fbc2a55b56eab59 (diff) | |
download | FreeBSD-src-d3fc8e917d0e4229d20c4bce04b682b3710fd2dc.zip FreeBSD-src-d3fc8e917d0e4229d20c4bce04b682b3710fd2dc.tar.gz |
MFamd64 r238623:
Introduce curpcb magic variable.
Requested and reviewed by: bde
MFC after: 3 weeks
Diffstat (limited to 'sys/i386/i386/trap.c')
-rw-r--r-- | sys/i386/i386/trap.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 4a64652..c0c5678 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -344,7 +344,7 @@ trap(struct trapframe *frame) if ((ISPL(frame->tf_cs) == SEL_UPL) || ((frame->tf_eflags & PSL_VM) && - !(PCPU_GET(curpcb)->pcb_flags & PCB_VM86CALL))) { + !(curpcb->pcb_flags & PCB_VM86CALL))) { /* user trap */ td->td_pticks = 0; @@ -593,7 +593,7 @@ trap(struct trapframe *frame) /* FALL THROUGH */ case T_SEGNPFLT: /* segment not present fault */ - if (PCPU_GET(curpcb)->pcb_flags & PCB_VM86CALL) + if (curpcb->pcb_flags & PCB_VM86CALL) break; /* @@ -606,7 +606,7 @@ trap(struct trapframe *frame) * a signal. */ if (frame->tf_eip == (int)cpu_switch_load_gs) { - PCPU_GET(curpcb)->pcb_gs = 0; + curpcb->pcb_gs = 0; #if 0 PROC_LOCK(p); kern_psignal(p, SIGBUS); @@ -644,9 +644,9 @@ trap(struct trapframe *frame) frame->tf_eip = (int)doreti_popl_fs_fault; goto out; } - if (PCPU_GET(curpcb)->pcb_onfault != NULL) { + if (curpcb->pcb_onfault != NULL) { frame->tf_eip = - (int)PCPU_GET(curpcb)->pcb_onfault; + (int)curpcb->pcb_onfault; goto out; } break; @@ -696,7 +696,7 @@ trap(struct trapframe *frame) * debugging the kernel. */ if (user_dbreg_trap() && - !(PCPU_GET(curpcb)->pcb_flags & PCB_VM86CALL)) { + !(curpcb->pcb_flags & PCB_VM86CALL)) { /* * Reset breakpoint bits because the * processor doesn't @@ -877,7 +877,7 @@ trap_pfault(frame, usermode, eva) * it normally, and panic immediately. */ if (!usermode && (td->td_intr_nesting_level != 0 || - PCPU_GET(curpcb)->pcb_onfault == NULL)) { + curpcb->pcb_onfault == NULL)) { trap_fatal(frame, eva); return (-1); } @@ -935,8 +935,8 @@ trap_pfault(frame, usermode, eva) nogo: if (!usermode) { if (td->td_intr_nesting_level == 0 && - PCPU_GET(curpcb)->pcb_onfault != NULL) { - frame->tf_eip = (int)PCPU_GET(curpcb)->pcb_onfault; + curpcb->pcb_onfault != NULL) { + frame->tf_eip = (int)curpcb->pcb_onfault; return (0); } trap_fatal(frame, eva); |