Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/yamt-km]: src/sys/arch/atari/atari convert arch/atari to new apis.
details: https://anonhg.NetBSD.org/src/rev/9df34dd09e89
branches: yamt-km
changeset: 573299:9df34dd09e89
user: yamt <yamt%NetBSD.org@localhost>
date: Wed Jan 26 11:56:45 2005 +0000
description:
convert arch/atari to new apis.
diffstat:
sys/arch/atari/atari/bus.c | 19 ++++++++++++-------
sys/arch/atari/atari/pmap.c | 18 ++++++++++--------
2 files changed, 22 insertions(+), 15 deletions(-)
diffs (131 lines):
diff -r 84a19b313be5 -r 9df34dd09e89 sys/arch/atari/atari/bus.c
--- a/sys/arch/atari/atari/bus.c Wed Jan 26 11:55:08 2005 +0000
+++ b/sys/arch/atari/atari/bus.c Wed Jan 26 11:56:45 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.c,v 1.37 2004/11/28 17:34:45 thorpej Exp $ */
+/* $NetBSD: bus.c,v 1.37.6.1 2005/01/26 11:56:45 yamt Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.37 2004/11/28 17:34:45 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.37.6.1 2005/01/26 11:56:45 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -263,7 +263,7 @@
return (0);
}
- va = uvm_km_valloc(kernel_map, endpa - pa);
+ va = uvm_km_alloc(kernel_map, endpa - pa, 0, UVM_KMF_VAONLY);
if (va == 0)
return (ENOMEM);
@@ -312,8 +312,11 @@
/*
* Free the kernel virtual mapping.
*/
- if (!bootm_free(va, endva - va))
- uvm_km_free(kernel_map, va, endva - va);
+ if (!bootm_free(va, endva - va)) {
+ pmap_remove(pmap_kernel(), va, endva);
+ pmap_update(pmap_kernel());
+ uvm_km_free(kernel_map, va, endva - va, UVM_KMF_VAONLY);
+ }
/*
* Mark as free in the extent map.
@@ -716,7 +719,7 @@
size = round_page(size);
- va = uvm_km_valloc(kernel_map, size);
+ va = uvm_km_alloc(kernel_map, size, 0, UVM_KMF_VAONLY);
if (va == 0)
return (ENOMEM);
@@ -757,7 +760,9 @@
size = round_page(size);
- uvm_km_free(kernel_map, (vaddr_t)kva, size);
+ pmap_remove(pmap_kernel(), (vaddr_t)kva, (vaddr_t)kva + size);
+ pmap_update(pmap_kernel());
+ uvm_km_free(kernel_map, (vaddr_t)kva, size, UVM_KMF_VAONLY);
}
/*
diff -r 84a19b313be5 -r 9df34dd09e89 sys/arch/atari/atari/pmap.c
--- a/sys/arch/atari/atari/pmap.c Wed Jan 26 11:55:08 2005 +0000
+++ b/sys/arch/atari/atari/pmap.c Wed Jan 26 11:56:45 2005 +0000
@@ -106,7 +106,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.87 2005/01/01 21:02:13 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.87.4.1 2005/01/26 11:56:45 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -520,7 +520,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;
@@ -585,7 +585,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);
@@ -679,7 +679,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];
@@ -723,7 +724,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;
}
}
@@ -863,8 +864,8 @@
(vaddr_t)pmap->pm_ptab - vm_map_min(kernel_map),
(vaddr_t)pmap->pm_ptab + ATARI_UPTSIZE
- vm_map_min(kernel_map));
- uvm_km_free_wakeup(pt_map, (vaddr_t)pmap->pm_ptab,
- ATARI_UPTSIZE);
+ uvm_km_free(pt_map, (vaddr_t)pmap->pm_ptab,
+ ATARI_UPTSIZE, UVM_KMF_VAONLY);
}
KASSERT(pmap->pm_stab == Segtabzero);
}
@@ -1093,7 +1094,8 @@
*/
if (pmap->pm_ptab == NULL)
pmap->pm_ptab = (u_int *)
- uvm_km_valloc_wait(pt_map, ATARI_UPTSIZE);
+ uvm_km_alloc(pt_map, ATARI_UPTSIZE, 0,
+ UVM_KMF_VAONLY | UVM_KMF_WAITVA);
/*
* Segment table entry not valid, we need a new PT page
Home |
Main Index |
Thread Index |
Old Index