summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-11-22 09:49:44 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-11-22 09:49:44 +0000
commit01d8d448c155b44237537694fbe8614075ff50f0 (patch)
treed6a322372ffde0f93c35e13c4b18aad3157a11d4 /sys
parentcb5795d66cc52f42f5b29eff22aa1e28ba8814e0 (diff)
more pmap_enter vs. pmap_kenter.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc/sparc/machdep.c16
-rw-r--r--sys/arch/sparc/sparc/vm_machdep.c6
2 files changed, 9 insertions, 13 deletions
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index ad361539368..a1a272fbc87 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.69 2001/11/22 09:23:51 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.70 2001/11/22 09:49:43 art Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
@@ -937,7 +937,7 @@ mapdev(phys, virt, offset, size)
struct rom_reg *phys;
int offset, virt, size;
{
- vaddr_t v;
+ vaddr_t va;
paddr_t pa;
void *ret;
static vaddr_t iobase;
@@ -951,23 +951,23 @@ mapdev(phys, virt, offset, size)
panic("mapdev: zero size");
if (virt)
- v = trunc_page(virt);
+ va = trunc_page(virt);
else {
- v = iobase;
+ va = iobase;
iobase += size;
if (iobase > IODEV_END) /* unlikely */
panic("mapiodev");
}
- ret = (void *)(v | (((u_long)phys->rr_paddr + offset) & PGOFSET));
+ ret = (void *)(va | (((u_long)phys->rr_paddr + offset) & PGOFSET));
/* note: preserve page offset */
pa = trunc_page((vaddr_t)phys->rr_paddr + offset);
pmtype = PMAP_IOENC(phys->rr_iospace);
do {
- pmap_enter(pmap_kernel(), v, pa | pmtype | PMAP_NC,
- VM_PROT_READ | VM_PROT_WRITE, PMAP_WIRED);
- v += PAGE_SIZE;
+ pmap_kenter_pa(va, pa | pmtype | PMAP_NC,
+ VM_PROT_READ | VM_PROT_WRITE);
+ va += PAGE_SIZE;
pa += PAGE_SIZE;
} while ((size -= PAGE_SIZE) > 0);
return (ret);
diff --git a/sys/arch/sparc/sparc/vm_machdep.c b/sys/arch/sparc/sparc/vm_machdep.c
index 2b95f1a5382..ba9db25a4cc 100644
--- a/sys/arch/sparc/sparc/vm_machdep.c
+++ b/sys/arch/sparc/sparc/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.35 2001/11/07 01:18:00 art Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.36 2001/11/22 09:49:43 art Exp $ */
/* $NetBSD: vm_machdep.c,v 1.30 1997/03/10 23:55:40 pk Exp $ */
/*
@@ -333,10 +333,6 @@ vmapbuf(bp, sz)
if (!(cpuinfo.flags & CPUFLG_CACHE_MANDATORY))
pa |= PMAP_NC;
- /*
- * pmap_enter distributes this mapping to all
- * contexts... maybe we should avoid this extra work
- */
pmap_enter(pmap_kernel(), kva, pa,
VM_PROT_READ | VM_PROT_WRITE, PMAP_WIRED);