diff --git a/sys/arch/hp300/hp300/trap.c b/sys/arch/hp300/hp300/trap.c index 99a99e7dcda7..ee769544824a 100644 --- a/sys/arch/hp300/hp300/trap.c +++ b/sys/arch/hp300/hp300/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.117 2006/03/26 01:50:07 tsutsui Exp $ */ +/* $NetBSD: trap.c,v 1.118 2006/03/26 01:59:31 tsutsui Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.117 2006/03/26 01:50:07 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.118 2006/03/26 01:59:31 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_execfmt.h" @@ -224,7 +224,7 @@ userret(struct lwp *l, struct frame *fp, u_quad_t oticks, int sig; int beenhere = 0; -again: + again: #endif /* Invoke MI userret code */ mi_userret(l); @@ -413,12 +413,12 @@ trap(int type, u_int code, u_int v, struct frame frame) case T_FPERR|T_USER: /* 68881 exceptions */ /* - * We pass along the 68881 status which locore stashed + * We pass along the 68881 status register which locore stashed * in code for us. Note that there is a possibility that the - * bit pattern of this will conflict with one of the + * bit pattern of this register will conflict with one of the * FPE_* codes defined in signal.h. Fortunately for us, the * only such codes we use are all in the range 1-7 and the low - * 3 bits of the status are defined as 0 so there is + * 3 bits of the status register are defined as 0 so there is * no clash. */ ksi.ksi_signo = SIGFPE; @@ -716,7 +716,7 @@ trap(int type, u_int code, u_int v, struct frame frame) trapsignal(l, &ksi); if ((type & T_USER) == 0) return; -out: + out: userret(l, &frame, sticks, v, 1); } @@ -788,7 +788,7 @@ writeback(struct frame *fp, int docachepush) trunc_page(f->f_fa), VM_PROT_WRITE, VM_PROT_WRITE|PMAP_WIRED); pmap_update(pmap_kernel()); - fa = (u_int)&vmmap[(f->f_fa & PGOFSET) & ~0xF]; + fa = (u_int)&vmmap[m68k_page_offset(f->f_fa) ^ ~0xF]; memcpy((caddr_t)fa, (caddr_t)&f->f_pd0, 16); (void) pmap_extract(pmap_kernel(), (vaddr_t)fa, &pa); DCFL(pa); @@ -972,13 +972,14 @@ writeback(struct frame *fp, int docachepush) l->l_addr->u_pcb.pcb_onfault = oonfault; if (err) err = SIGSEGV; - return (err); + return err; } #ifdef DEBUG void dumpssw(u_short ssw) { + printf(" SSW: %x: ", ssw); if (ssw & SSW4_CP) printf("CP,");