summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/m68k/include/pmap_motorola.h4
-rw-r--r--sys/arch/m68k/m68k/pmap_motorola.c69
-rw-r--r--sys/arch/mac68k/include/pmap.h5
3 files changed, 39 insertions, 39 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;
diff --git a/sys/arch/mac68k/include/pmap.h b/sys/arch/mac68k/include/pmap.h
index e823fea106c..107c9b02bca 100644
--- a/sys/arch/mac68k/include/pmap.h
+++ b/sys/arch/mac68k/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.17 2002/03/14 01:26:35 millert Exp $ */
+/* $OpenBSD: pmap.h,v 1.18 2003/03/01 00:28:48 miod Exp $ */
#ifndef _MAC68K_PMAP_H_
#define _MAC68K_PMAP_H_
@@ -7,7 +7,8 @@
#ifdef _KERNEL
-void mac68k_set_pte(vaddr_t va, paddr_t pge);
+vaddr_t pmap_map(vaddr_t, paddr_t, paddr_t, int);
+void mac68k_set_pte(vaddr_t, paddr_t);
void pmap_init_md(void);
#define PMAP_INIT_MD() pmap_init_md()