diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2003-02-26 21:54:45 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2003-02-26 21:54:45 +0000 |
commit | 69e79a52e04b45badd8b0ebc99f4cb0bfdc3afea (patch) | |
tree | b672327bf9b8c74c22fa25eba2957b887fe15534 | |
parent | 55e318a23027c876c059d31551485df31d2ec4e3 (diff) |
Remove an unnecessary structure copy from useage of setfault(), call
by reference, not by value, ok matthieu#, miod@
-rw-r--r-- | sys/arch/macppc/macppc/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/macppc/pci/mpcpcibus.c | 4 | ||||
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/powerpc/ddb/db_memrw.c | 6 | ||||
-rw-r--r-- | sys/arch/powerpc/ddb/db_trace.c | 4 | ||||
-rw-r--r-- | sys/arch/powerpc/include/pcb.h | 4 | ||||
-rw-r--r-- | sys/arch/powerpc/powerpc/pmap.c | 10 | ||||
-rw-r--r-- | sys/arch/powerpc/powerpc/trap.c | 4 |
8 files changed, 20 insertions, 20 deletions
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c index 2705c576fac..d8955cf2c3b 100644 --- a/sys/arch/macppc/macppc/machdep.c +++ b/sys/arch/macppc/macppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.47 2002/12/17 23:11:32 millert Exp $ */ +/* $OpenBSD: machdep.c,v 1.48 2003/02/26 21:54:44 drahn Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -1474,7 +1474,7 @@ kcopy(from, to, size) faultbuf env; register void *oldh = curproc->p_addr->u_pcb.pcb_onfault; - if (setfault(env)) { + if (setfault(&env)) { curproc->p_addr->u_pcb.pcb_onfault = oldh; return EFAULT; } diff --git a/sys/arch/macppc/pci/mpcpcibus.c b/sys/arch/macppc/pci/mpcpcibus.c index 6d08d0d5bee..ed0c47e784e 100644 --- a/sys/arch/macppc/pci/mpcpcibus.c +++ b/sys/arch/macppc/pci/mpcpcibus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpcpcibus.c,v 1.17 2003/02/18 13:14:43 jmc Exp $ */ +/* $OpenBSD: mpcpcibus.c,v 1.18 2003/02/26 21:54:44 drahn Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom @@ -874,7 +874,7 @@ mpc_conf_read(cpv, tag, offset) s = splhigh(); oldh = curpcb->pcb_onfault; - if (setfault(env)) { + if (setfault(&env)) { /* we faulted during the read? */ curpcb->pcb_onfault = oldh; return 0xffffffff; diff --git a/sys/arch/mvmeppc/mvmeppc/machdep.c b/sys/arch/mvmeppc/mvmeppc/machdep.c index 566ae6e779e..0a8b5045244 100644 --- a/sys/arch/mvmeppc/mvmeppc/machdep.c +++ b/sys/arch/mvmeppc/mvmeppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.29 2002/12/17 23:11:32 millert Exp $ */ +/* $OpenBSD: machdep.c,v 1.30 2003/02/26 21:54:44 drahn Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -1379,7 +1379,7 @@ kcopy(from, to, size) faultbuf env; register void *oldh = curproc->p_addr->u_pcb.pcb_onfault; - if (setfault(env)) { + if (setfault(&env)) { curproc->p_addr->u_pcb.pcb_onfault = oldh; return EFAULT; } diff --git a/sys/arch/powerpc/ddb/db_memrw.c b/sys/arch/powerpc/ddb/db_memrw.c index 02616f7f982..f5ec5b691b8 100644 --- a/sys/arch/powerpc/ddb/db_memrw.c +++ b/sys/arch/powerpc/ddb/db_memrw.c @@ -1,5 +1,5 @@ /* $NetBSD: db_memrw.c,v 1.4 2001/05/18 20:38:27 matt Exp $ */ -/* $OpenBSD: db_memrw.c,v 1.3 2002/09/15 09:01:59 deraadt Exp $ */ +/* $OpenBSD: db_memrw.c,v 1.4 2003/02/26 21:54:44 drahn Exp $ */ /* * Mach Operating System @@ -61,7 +61,7 @@ db_read_bytes(addr, size, data) register char *src = (char *)addr; faultbuf env; faultbuf *old_onfault = curpcb->pcb_onfault; - if (setfault(env)) { + if (setfault(&env)) { curpcb->pcb_onfault = old_onfault; return; } @@ -92,7 +92,7 @@ db_write_bytes(addr, size, data) faultbuf env; faultbuf *old_onfault = curpcb->pcb_onfault; - if (setfault(env)) { + if (setfault(&env)) { curpcb->pcb_onfault = old_onfault; return; } diff --git a/sys/arch/powerpc/ddb/db_trace.c b/sys/arch/powerpc/ddb/db_trace.c index 63214acd6fc..a84d4a9f688 100644 --- a/sys/arch/powerpc/ddb/db_trace.c +++ b/sys/arch/powerpc/ddb/db_trace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_trace.c,v 1.2 2003/02/12 22:41:35 jason Exp $ */ +/* $OpenBSD: db_trace.c,v 1.3 2003/02/26 21:54:44 drahn Exp $ */ /* $NetBSD: db_trace.c,v 1.15 1996/02/22 23:23:41 gwr Exp $ */ /* @@ -103,7 +103,7 @@ db_read32(u_int32_t paddr, u_int32_t *value) { faultbuf env; faultbuf *old_onfault = curpcb->pcb_onfault; - if (setfault(env)) { + if (setfault(&env)) { curpcb->pcb_onfault = old_onfault; return EFAULT; } diff --git a/sys/arch/powerpc/include/pcb.h b/sys/arch/powerpc/include/pcb.h index 2530c91c6fc..bd356bd1891 100644 --- a/sys/arch/powerpc/include/pcb.h +++ b/sys/arch/powerpc/include/pcb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcb.h,v 1.8 2002/03/14 01:26:42 millert Exp $ */ +/* $OpenBSD: pcb.h,v 1.9 2003/02/26 21:54:44 drahn Exp $ */ /* $NetBSD: pcb.h,v 1.1 1996/09/30 16:34:29 ws Exp $ */ /*- @@ -68,6 +68,6 @@ struct md_coredump { extern struct pcb *curpcb; extern struct pmap *curpm; extern struct proc *fpuproc; -int setfault(faultbuf env); +int setfault(faultbuf *env); #endif #endif /* _POWERPC_PCB_H_ */ diff --git a/sys/arch/powerpc/powerpc/pmap.c b/sys/arch/powerpc/powerpc/pmap.c index a221796ec10..90a3018f056 100644 --- a/sys/arch/powerpc/powerpc/pmap.c +++ b/sys/arch/powerpc/powerpc/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.79 2003/01/30 15:38:09 drahn Exp $ */ +/* $OpenBSD: pmap.c,v 1.80 2003/02/26 21:54:44 drahn Exp $ */ /* * Copyright (c) 2001, 2002 Dale Rahn. All rights reserved. @@ -1578,7 +1578,7 @@ copyin(udaddr, kaddr, len) if (l > len) l = len; oldsr = pmap_setusr(curpcb->pcb_pm, (vaddr_t)udaddr); - if (setfault(env)) { + if (setfault(&env)) { pmap_popusr(oldsr); curpcb->pcb_onfault = oldh; return EFAULT; @@ -1611,7 +1611,7 @@ copyout(kaddr, udaddr, len) if (l > len) l = len; oldsr = pmap_setusr(curpcb->pcb_pm, (vaddr_t)udaddr); - if (setfault(env)) { + if (setfault(&env)) { pmap_popusr(oldsr); curpcb->pcb_onfault = oldh; return EFAULT; @@ -1649,7 +1649,7 @@ copyinstr(const void *udaddr, void *kaddr, size_t len, size_t *done) l = len; len -= l; oldsr = pmap_setusr(curpcb->pcb_pm, (vaddr_t)uaddr); - if (setfault(env)) { + if (setfault(&env)) { if (done != NULL) *done = cnt; @@ -1705,7 +1705,7 @@ copyoutstr(const void *kaddr, void *udaddr, size_t len, size_t *done) l = len; len -= l; oldsr = pmap_setusr(curpcb->pcb_pm, (vaddr_t)uaddr); - if (setfault(env)) { + if (setfault(&env)) { if (done != NULL) *done = cnt; diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c index bc508d5b8ba..75515072597 100644 --- a/sys/arch/powerpc/powerpc/trap.c +++ b/sys/arch/powerpc/powerpc/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.55 2002/10/13 18:26:12 krw Exp $ */ +/* $OpenBSD: trap.c,v 1.56 2003/02/26 21:54:44 drahn Exp $ */ /* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */ /* @@ -713,7 +713,7 @@ badaddr(addr, len) u_int32_t v; register void *oldh = curpcb->pcb_onfault; - if (setfault(env)) { + if (setfault(&env)) { curpcb->pcb_onfault = oldh; return EFAULT; } |