diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2018-02-17 22:33:01 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2018-02-17 22:33:01 +0000 |
commit | 5903347190e2d0026524b52d3424de133315f112 (patch) | |
tree | 06da7b5e2bb771c5dad40e870cf52a27543d799d /sys | |
parent | eda65ed24498c35b5b91445324a3834c2d86b161 (diff) |
Rename memhook to vmmap to match other archs.
ok millert@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/arm64/arm64/mem.c | 13 | ||||
-rw-r--r-- | sys/arch/arm64/arm64/pmap.c | 6 |
2 files changed, 9 insertions, 10 deletions
diff --git a/sys/arch/arm64/arm64/mem.c b/sys/arch/arm64/arm64/mem.c index 5b2cb6b3a7c..a64e9f1ab69 100644 --- a/sys/arch/arm64/arm64/mem.c +++ b/sys/arch/arm64/arm64/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.3 2017/12/14 03:30:43 guenther Exp $ */ +/* $OpenBSD: mem.c,v 1.4 2018/02/17 22:33:00 kettenis Exp $ */ /* $NetBSD: mem.c,v 1.11 2003/10/16 12:02:58 jdolecek Exp $ */ /* @@ -89,7 +89,6 @@ #include <uvm/uvm_extern.h> -extern char *memhook; /* poor name! */ caddr_t zeropage; /* open counter for aperture */ @@ -150,13 +149,13 @@ mmrw(dev_t dev, struct uio *uio, int flags) struct iovec *iov; int error = 0; vm_prot_t prot; + extern caddr_t vmmap; if (minor(dev) == 0) { /* lock against other uses of shared vmmap */ error = rw_enter(&physlock, RW_WRITE | RW_INTR); if (error) return (error); - } while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; @@ -173,14 +172,14 @@ mmrw(dev_t dev, struct uio *uio, int flags) v = uio->uio_offset; prot = uio->uio_rw == UIO_READ ? PROT_READ : PROT_WRITE; - pmap_enter(pmap_kernel(), (vaddr_t)memhook, + pmap_enter(pmap_kernel(), (vaddr_t)vmmap, trunc_page(v), prot, prot|PMAP_WIRED); pmap_update(pmap_kernel()); o = uio->uio_offset & PGOFSET; c = ulmin(uio->uio_resid, PAGE_SIZE - o); - error = uiomove((caddr_t)memhook + o, c, uio); - pmap_remove(pmap_kernel(), (vaddr_t)memhook, - (vaddr_t)memhook + PAGE_SIZE); + error = uiomove((caddr_t)vmmap + o, c, uio); + pmap_remove(pmap_kernel(), (vaddr_t)vmmap, + (vaddr_t)vmmap + PAGE_SIZE); pmap_update(pmap_kernel()); break; diff --git a/sys/arch/arm64/arm64/pmap.c b/sys/arch/arm64/arm64/pmap.c index 97223f6b025..1bb539fa871 100644 --- a/sys/arch/arm64/arm64/pmap.c +++ b/sys/arch/arm64/arm64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.47 2018/01/31 23:23:16 kettenis Exp $ */ +/* $OpenBSD: pmap.c,v 1.48 2018/02/17 22:33:00 kettenis Exp $ */ /* * Copyright (c) 2008-2009,2014-2016 Dale Rahn <drahn@dalerahn.com> * @@ -139,7 +139,7 @@ vaddr_t pmap_map_stolen(vaddr_t); void pmap_physload_avail(void); extern caddr_t msgbufaddr; -char *memhook; +vaddr_t vmmap; vaddr_t zero_page; vaddr_t copy_src_page; vaddr_t copy_dst_page; @@ -1216,7 +1216,7 @@ pmap_bootstrap(long kvo, paddr_t lpt1, long kernelstart, long kernelend, curcpu()->ci_curpm = pmap_kernel(); - memhook = (char *)vstart; + vmmap = vstart; vstart += PAGE_SIZE; return vstart; |