Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/yamt-km]: src/sys/arch/amiga/amiga convert arch/amiga to new apis.
details: https://anonhg.NetBSD.org/src/rev/5c37de54ef8d
branches: yamt-km
changeset: 573315:5c37de54ef8d
user: yamt <yamt%NetBSD.org@localhost>
date: Mon Jan 31 12:16:29 2005 +0000
description:
convert arch/amiga to new apis.
diffstat:
sys/arch/amiga/amiga/pmap.c | 28 ++++++++++++++++------------
1 files changed, 16 insertions(+), 12 deletions(-)
diffs (98 lines):
diff -r 76efe7b70bb4 -r 5c37de54ef8d sys/arch/amiga/amiga/pmap.c
--- a/sys/arch/amiga/amiga/pmap.c Mon Jan 31 12:16:09 2005 +0000
+++ b/sys/arch/amiga/amiga/pmap.c Mon Jan 31 12:16:29 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.111.4.1 2005/01/27 14:32:39 yamt Exp $ */
+/* $NetBSD: pmap.c,v 1.111.4.2 2005/01/31 12:16:29 yamt Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -107,7 +107,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.111.4.1 2005/01/27 14:32:39 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.111.4.2 2005/01/31 12:16:29 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -564,7 +564,7 @@
s += page_cnt * sizeof(char); /* attribute table */
s = round_page(s);
- addr = uvm_km_zalloc(kernel_map, s);
+ addr = uvm_km_alloc(kernel_map, s, 0, UVM_KMF_WIRED | UVM_KMF_ZERO);
if (addr == 0)
panic("pmap_init: can't allocate data structures");
Segtabzero = (u_int *) addr;
@@ -630,7 +630,7 @@
* Now allocate the space and link the pages together to
* form the KPT free list.
*/
- addr = uvm_km_zalloc(kernel_map, s);
+ addr = uvm_km_alloc(kernel_map, s, 0, UVM_KMF_WIRED | UVM_KMF_ZERO);
if (addr == 0)
panic("pmap_init: cannot allocate KPT free list");
s = ptoa(npg);
@@ -719,7 +719,8 @@
int i;
if (pv_nfree == 0) {
- pvp = (struct pv_page *)uvm_km_zalloc(kernel_map, PAGE_SIZE);
+ pvp = (struct pv_page *)uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
+ UVM_KMF_WIRED | UVM_KMF_ZERO);
if (pvp == 0)
panic("pmap_alloc_pv: uvm_km_zalloc() failed");
pvp->pvp_pgi.pgi_freelist = pv = &pvp->pvp_pv[1];
@@ -763,7 +764,7 @@
case NPVPPG:
pv_nfree -= NPVPPG - 1;
TAILQ_REMOVE(&pv_page_freelist, pvp, pvp_pgi.pgi_list);
- uvm_km_free(kernel_map, (vaddr_t)pvp, PAGE_SIZE);
+ uvm_km_free(kernel_map, (vaddr_t)pvp, PAGE_SIZE, UVM_KMF_WIRED);
break;
}
}
@@ -902,8 +903,8 @@
(vaddr_t)pmap->pm_ptab + AMIGA_UPTSIZE);
uvm_km_pgremove((vaddr_t)pmap->pm_ptab,
(vaddr_t)pmap->pm_ptab + AMIGA_UPTSIZE);
- uvm_km_free_wakeup(pt_map, (vaddr_t)pmap->pm_ptab,
- AMIGA_UPTSIZE);
+ uvm_km_free(pt_map, (vaddr_t)pmap->pm_ptab,
+ AMIGA_UPTSIZE, UVM_KMF_VAONLY);
}
KASSERT(pmap->pm_stab == Segtabzero);
}
@@ -1132,7 +1133,8 @@
*/
if (pmap->pm_ptab == NULL)
pmap->pm_ptab = (pt_entry_t *)
- uvm_km_valloc_wait(pt_map, AMIGA_UPTSIZE);
+ uvm_km_alloc(pt_map, AMIGA_UPTSIZE, 0,
+ UVM_KMF_VAONLY | UVM_KMF_WAITVA);
/*
* Segment table entry not valid, we need a new PT page
@@ -2215,8 +2217,9 @@
(vaddr_t)ptpmap->pm_stab + AMIGA_STSIZE);
uvm_pagefree(PHYS_TO_VM_PAGE((paddr_t)
ptpmap->pm_stpa));
- uvm_km_free_wakeup(kernel_map,
- (vaddr_t)ptpmap->pm_stab, AMIGA_STSIZE);
+ uvm_km_free(kernel_map,
+ (vaddr_t)ptpmap->pm_stab, AMIGA_STSIZE,
+ UVM_KMF_VAONLY);
ptpmap->pm_stab = Segtabzero;
ptpmap->pm_stpa = Segtabzeropa;
#if defined(M68040) || defined(M68060)
@@ -2458,7 +2461,8 @@
if (pmap->pm_stab == Segtabzero) {
/* XXX Atari uses kernel_map here: */
pmap->pm_stab = (st_entry_t *)
- uvm_km_zalloc(kernel_map, AMIGA_STSIZE);
+ uvm_km_alloc(kernel_map, AMIGA_STSIZE, 0,
+ UVM_KMF_WIRED | UVM_KMF_ZERO);
(void) pmap_extract(pmap_kernel(), (vaddr_t)pmap->pm_stab,
(paddr_t *)&pmap->pm_stpa);
#if defined(M68040) || defined(M68060)
Home |
Main Index |
Thread Index |
Old Index