summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2015-06-05 16:07:25 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2015-06-05 16:07:25 +0000
commitc1ffbcb8631864b56a8da9d313b8e45ec58f437d (patch)
tree53d86a0bf0385c9dc94a309c11bf6fb9fe77b9e6 /sys/arch
parent4131bdc9c0da0aea12bce891d2fdb8d92bc732d2 (diff)
These days p->p_addr will never be NULL.
ok deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc64/sparc64/trap.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c
index f4c9067e423..3b97b25df95 100644
--- a/sys/arch/sparc64/sparc64/trap.c
+++ b/sys/arch/sparc64/sparc64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.85 2014/11/16 12:30:59 deraadt Exp $ */
+/* $OpenBSD: trap.c,v 1.86 2015/06/05 16:07:24 kettenis Exp $ */
/* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */
/*
@@ -614,7 +614,7 @@ dopanic:
/*
* If we're busy doing copyin/copyout continue
*/
- if (p->p_addr && p->p_addr->u_pcb.pcb_onfault) {
+ if (p->p_addr->u_pcb.pcb_onfault) {
tf->tf_pc = (vaddr_t)p->p_addr->u_pcb.pcb_onfault;
tf->tf_npc = tf->tf_pc + 4;
break;
@@ -807,7 +807,7 @@ data_access_fault(tf, type, pc, addr, sfva, sfsr)
* If this was an access that we shouldn't try to page in,
* resume at the fault handler without any action.
*/
- if (p->p_addr && p->p_addr->u_pcb.pcb_onfault == Lfsprobe)
+ if (p->p_addr->u_pcb.pcb_onfault == Lfsprobe)
goto kfault;
#endif
@@ -860,8 +860,7 @@ data_access_fault(tf, type, pc, addr, sfva, sfsr)
*/
if (tstate & TSTATE_PRIV) {
kfault:
- onfault = p->p_addr ?
- (long)p->p_addr->u_pcb.pcb_onfault : 0;
+ onfault = (long)p->p_addr->u_pcb.pcb_onfault;
if (!onfault) {
extern int trap_trace_dis;
trap_trace_dis = 1; /* Disable traptrace for printf */
@@ -939,7 +938,7 @@ data_access_error(tf, type, afva, afsr, sfva, sfsr)
sv.sival_ptr = (void *)pc;
- onfault = p->p_addr ? (long)p->p_addr->u_pcb.pcb_onfault : 0;
+ onfault = (long)p->p_addr->u_pcb.pcb_onfault;
printf("data error type %x sfsr=%lx sfva=%lx afsr=%lx afva=%lx tf=%p\n",
type, sfsr, sfva, afsr, afva, tf);