Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/shark/ofw use kenter_pa/kremove
details: https://anonhg.NetBSD.org/src/rev/bc3e334829b5
branches: trunk
changeset: 326931:bc3e334829b5
user: matt <matt%NetBSD.org@localhost>
date: Sat Feb 22 18:55:18 2014 +0000
description:
use kenter_pa/kremove
diffstat:
sys/arch/shark/ofw/ofrom.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diffs (49 lines):
diff -r af63a36f3b39 -r bc3e334829b5 sys/arch/shark/ofw/ofrom.c
--- a/sys/arch/shark/ofw/ofrom.c Sat Feb 22 18:42:47 2014 +0000
+++ b/sys/arch/shark/ofw/ofrom.c Sat Feb 22 18:55:18 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ofrom.c,v 1.23 2011/07/26 08:56:26 mrg Exp $ */
+/* $NetBSD: ofrom.c,v 1.24 2014/02/22 18:55:18 matt Exp $ */
/*
* Copyright 1998
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofrom.c,v 1.23 2011/07/26 08:56:26 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofrom.c,v 1.24 2014/02/22 18:55:18 matt Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -125,6 +125,7 @@
int
ofromrw(dev_t dev, struct uio *uio, int flags)
{
+ pmap_t kpm = pmap_kernel();
struct ofrom_softc *sc;
int c, error = 0;
struct iovec *iov;
@@ -158,16 +159,15 @@
/* XXX: Use unamanged mapping. */
v = sc->base + uio->uio_offset;
- pmap_enter(pmap_kernel(), (vaddr_t)memhook,
- trunc_page(v), uio->uio_rw == UIO_READ ?
- VM_PROT_READ : VM_PROT_WRITE, PMAP_WIRED);
- pmap_update(pmap_kernel());
+ pmap_kenter_pa((vaddr_t)memhook, trunc_page(v),
+ uio->uio_rw == UIO_READ ? VM_PROT_READ : VM_PROT_WRITE,
+ 0);
+ pmap_update(kpm);
o = uio->uio_offset & PGOFSET;
c = min(uio->uio_resid, (int)(PAGE_SIZE - o));
error = uiomove((char *)memhook + o, c, uio);
- pmap_remove(pmap_kernel(), (vaddr_t)memhook,
- (vaddr_t)memhook + PAGE_SIZE);
- pmap_update(pmap_kernel());
+ pmap_kremove((vaddr_t)memhook, (vaddr_t)memhook + PAGE_SIZE);
+ pmap_update(kpm);
}
mutex_exit(&memlock);
Home |
Main Index |
Thread Index |
Old Index