diff --git a/sys/arch/amiga/include/pmap.h b/sys/arch/amiga/include/pmap.h index db0fa247b744..5552cf8f6d4a 100644 --- a/sys/arch/amiga/include/pmap.h +++ b/sys/arch/amiga/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.25 1999/02/25 19:51:22 is Exp $ */ +/* $NetBSD: pmap.h,v 1.26 1999/02/25 21:54:53 is Exp $ */ /* * Copyright (c) 1987 Carnegie-Mellon University @@ -138,6 +138,7 @@ struct pmap kernel_pmap_store; vm_offset_t pmap_map __P((vm_offset_t, vm_offset_t, vm_offset_t, int)); void pmap_procwr __P((struct proc *, vm_offset_t, u_long)); +#define PMAP_NEED_PROCWR #endif /* _KERNEL */ diff --git a/sys/miscfs/procfs/procfs_mem.c b/sys/miscfs/procfs/procfs_mem.c index e3565cc3dc41..37383b2074c5 100644 --- a/sys/miscfs/procfs/procfs_mem.c +++ b/sys/miscfs/procfs/procfs_mem.c @@ -1,4 +1,4 @@ -/* $NetBSD: procfs_mem.c,v 1.19 1998/08/13 02:10:58 eeh Exp $ */ +/* $NetBSD: procfs_mem.c,v 1.20 1999/02/25 21:54:53 is Exp $ */ /* * Copyright (c) 1993 Jan-Simon Pendry @@ -222,9 +222,16 @@ procfs_domem(curp, p, pfs, uio) { int error; - if (uio->uio_resid == 0) + size_t len; + vaddr_t addr; + + len = uio->uio_resid; + + if (len == 0) return (0); + addr = uio->uio_offset; + if ((error = procfs_checkioperm(curp, p)) != 0) return (error); @@ -237,6 +244,12 @@ procfs_domem(curp, p, pfs, uio) error = uvm_io(&p->p_vmspace->vm_map, uio); PRELE(p); uvmspace_free(p->p_vmspace); + +#ifdef PMAP_NEED_PROCWR + if (uio->uio_rw == UIO_WRITE) + pmap_procwr(p, addr, len); +#endif + #else PHOLD(p); error = procfs_rwmem(p, uio);