summaryrefslogtreecommitdiff
path: root/sys/arch/m68k
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-03-01 00:28:49 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-03-01 00:28:49 +0000
commitdfddc6f7303c309e6ae4cefa937f328e92f008f5 (patch)
tree1fc6d59a06bcf3b293f551ddd7af72f05fe2546f /sys/arch/m68k
parent8bdc5996ee66394d9cb5a88d0780c0eea08d5bdb (diff)
- only declare and provide pmap_map() for mac68k, until it bites the dust.
Other m68k-based arches do not need it. - do not wait to allocate struct pv_page. Either pmap_enter() has been invoked with PMAP_CANFAIL and can live with this, or we are close to fandagoland anyways.
Diffstat (limited to 'sys/arch/m68k')
-rw-r--r--sys/arch/m68k/include/pmap_motorola.h4
-rw-r--r--sys/arch/m68k/m68k/pmap_motorola.c69
2 files changed, 36 insertions, 37 deletions
diff --git a/sys/arch/m68k/include/pmap_motorola.h b/sys/arch/m68k/include/pmap_motorola.h
index b3249037463..c306913b74b 100644
--- a/sys/arch/m68k/include/pmap_motorola.h
+++ b/sys/arch/m68k/include/pmap_motorola.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_motorola.h,v 1.7 2003/01/27 19:37:30 miod Exp $ */
+/* $OpenBSD: pmap_motorola.h,v 1.8 2003/03/01 00:28:45 miod Exp $ */
/*
* Copyright (c) 1987 Carnegie-Mellon University
@@ -139,8 +139,6 @@ void pmap_prefer(vaddr_t, vaddr_t *);
#define PMAP_PREFER(foff, vap) pmap_prefer((foff), (vap))
#endif
-vaddr_t pmap_map(vaddr_t, paddr_t, paddr_t, int);
-
#ifdef COMPAT_HPUX
int pmap_mapmulti(pmap_t, vaddr_t);
#endif
diff --git a/sys/arch/m68k/m68k/pmap_motorola.c b/sys/arch/m68k/m68k/pmap_motorola.c
index 41cec85a18b..73f1e2fffb1 100644
--- a/sys/arch/m68k/m68k/pmap_motorola.c
+++ b/sys/arch/m68k/m68k/pmap_motorola.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap_motorola.c,v 1.23 2003/02/25 16:57:24 miod Exp $ */
+/* $OpenBSD: pmap_motorola.c,v 1.24 2003/03/01 00:28:48 miod Exp $ */
/*
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -551,7 +551,8 @@ pmap_alloc_pv()
int i;
if (pv_nfree == 0) {
- pvp = (struct pv_page *)uvm_km_zalloc(kernel_map, PAGE_SIZE);
+ pvp = (struct pv_page *)uvm_km_kmemalloc(kernel_map,
+ uvm.kernel_object, PAGE_SIZE, UVM_KMF_NOWAIT);
if (pvp == NULL)
return NULL;
pvp->pvp_pgi.pgi_freelist = pv = &pvp->pvp_pv[1];
@@ -606,36 +607,6 @@ pmap_free_pv(pv)
}
/*
- * pmap_map:
- *
- * Used to map a range of physical addresses into kernel
- * virtual address space.
- *
- * For now, VM is already on, we only need to map the
- * specified memory.
- *
- * Note: THIS FUNCTION IS DEPRECATED, AND SHOULD BE REMOVED!
- */
-vaddr_t
-pmap_map(va, spa, epa, prot)
- vaddr_t va;
- paddr_t spa, epa;
- int prot;
-{
-
- PMAP_DPRINTF(PDB_FOLLOW,
- ("pmap_map(%lx, %lx, %lx, %x)\n", va, spa, epa, prot));
-
- while (spa < epa) {
- pmap_enter(pmap_kernel(), va, spa, prot, 0);
- va += PAGE_SIZE;
- spa += PAGE_SIZE;
- }
- pmap_update(pmap_kernel());
- return (va);
-}
-
-/*
* pmap_create: [ INTERFACE ]
*
* Create and return a physical map.
@@ -1157,7 +1128,7 @@ pmap_enter(pmap, va, pa, prot, flags)
splx(s);
return (ENOMEM);
} else
- panic("pmap_enter: uvm_km_zalloc() failed");
+ panic("pmap_enter: pmap_alloc_pv() failed");
}
npv->pv_va = va;
npv->pv_pmap = pmap;
@@ -2160,7 +2131,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
pv->pv_pmap, pv->pv_va, pv->pv_next);
#endif
pmap_remove_mapping(pmap_kernel(), ptpva,
- NULL, PRM_TFLUSH|PRM_CFLUSH);
+ PT_ENTRY_NULL, PRM_TFLUSH|PRM_CFLUSH);
uvm_pagefree(pg);
PMAP_DPRINTF(PDB_REMOVE|PDB_PTPAGE,
("remove: PT page 0x%lx (0x%lx) freed\n",
@@ -2843,6 +2814,36 @@ pmap_check_wiring(str, va)
/* XXX this should go out soon */
#ifdef mac68k
+/*
+ * pmap_map:
+ *
+ * Used to map a range of physical addresses into kernel
+ * virtual address space.
+ *
+ * For now, VM is already on, we only need to map the
+ * specified memory.
+ *
+ * Note: THIS FUNCTION IS DEPRECATED, AND SHOULD BE REMOVED!
+ */
+vaddr_t
+pmap_map(va, spa, epa, prot)
+ vaddr_t va;
+ paddr_t spa, epa;
+ int prot;
+{
+
+ PMAP_DPRINTF(PDB_FOLLOW,
+ ("pmap_map(%lx, %lx, %lx, %x)\n", va, spa, epa, prot));
+
+ while (spa < epa) {
+ pmap_enter(pmap_kernel(), va, spa, prot, 0);
+ va += PAGE_SIZE;
+ spa += PAGE_SIZE;
+ }
+ pmap_update(pmap_kernel());
+ return (va);
+}
+
void
mac68k_set_pte(va, pge)
vaddr_t va;