diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-02-20 18:35:44 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-02-20 18:35:44 +0000 |
commit | bab488fcfb90d7b7090fa84aad7392abd3ef2c56 (patch) | |
tree | 79f9f7acb26c465e39370a5591f508fb93a9fc93 /sys/arch/m88k | |
parent | a7ba0924ae2eb011fe89230eaebfa5a81a55036b (diff) |
Preserve pcb_onfault within kcopy(), as expected and as all other platforms do.
Diffstat (limited to 'sys/arch/m88k')
-rw-r--r-- | sys/arch/m88k/m88k/subr.S | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/arch/m88k/m88k/subr.S b/sys/arch/m88k/m88k/subr.S index d03edba7c2e..2062bfbdafc 100644 --- a/sys/arch/m88k/m88k/subr.S +++ b/sys/arch/m88k/m88k/subr.S @@ -1,4 +1,4 @@ -/* $OpenBSD: subr.S,v 1.16 2007/12/22 17:14:39 miod Exp $ */ +/* $OpenBSD: subr.S,v 1.17 2008/02/20 18:35:41 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1992 Carnegie Mellon University @@ -361,7 +361,7 @@ ASLOCAL(Lcidone) ldcr r5, CPU ld r6, r5, CI_CURPCB jmp.n r1 - st r0,r6,PCB_ONFAULT + st r0, r6, PCB_ONFAULT ASLOCAL(Lciflt) br.n _ASM_LABEL(Lcidone) @@ -637,7 +637,7 @@ ASLOCAL(Lcodone) ldcr r5, CPU ld r6, r5, CI_CURPCB jmp.n r1 - st r0,r6,PCB_ONFAULT /* clear the handler */ + st r0, r6, PCB_ONFAULT /* clear the handler */ ASLOCAL(Lcoflt) br.n _ASM_LABEL(Lcodone) @@ -705,7 +705,7 @@ ASLOCAL(Lcosdone) ldcr r5, CPU ld r6, r5, CI_CURPCB jmp.n r1 - st r0,r6,PCB_ONFAULT /* clear the handler */ + st r0, r6, PCB_ONFAULT /* clear the handler */ #undef SRC #undef DEST @@ -720,10 +720,13 @@ ASLOCAL(Lcosdone) * Copy len bytes from src to dst, aborting if we encounter a page fault. */ ENTRY(kcopy) + subu r31, r31, 16 ldcr r5, CPU ld r6, r5, CI_CURPCB or.u r5, r0, hi16(_ASM_LABEL(kcopy_fault)) + ld r7, r6, PCB_ONFAULT or r5, r5, lo16(_ASM_LABEL(kcopy_fault)) + st r7, r31, 0 /* save old pcb_onfault */ st r5, r6, PCB_ONFAULT /* pcb_onfault = kcopy_fault */ bcnd le0,r4,_ASM_LABEL(kcopy_out) /* nothing to do if <= 0 */ /* @@ -973,9 +976,11 @@ ASLOCAL(kcopy_out) or r2, r0, 0 /* return success */ ASLOCAL(kcopy_out_fault) ldcr r5, CPU + ld r7, r31, 0 ld r6, r5, CI_CURPCB + add r31, r31, 16 jmp.n r1 /* all done, return to caller */ - st r0, r6, PCB_ONFAULT /* clear the handler */ + st r7, r6, PCB_ONFAULT /* restore previous pcb_onfault */ ASLOCAL(kcopy_fault) br.n _ASM_LABEL(kcopy_out_fault) |