Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/yamt-km]: src/sys/arch use new apis.
details: https://anonhg.NetBSD.org/src/rev/9a3d563cf36f
branches: yamt-km
changeset: 573334:9a3d563cf36f
user: yamt <yamt%NetBSD.org@localhost>
date: Sat Feb 12 12:26:27 2005 +0000
description:
use new apis.
diffstat:
sys/arch/sparc64/dev/iommu.c | 10 +++++-----
sys/arch/sun3/sun3/bus_subr.c | 10 ++++++----
sys/arch/sun3/sun3/dvma.c | 11 ++++++-----
sys/arch/sun3/sun3/machdep.c | 10 ++++++----
sys/arch/sun3/sun3x/bus_subr.c | 8 ++++----
sys/arch/sun3/sun3x/dvma.c | 6 +++---
sys/arch/sun3/sun3x/machdep.c | 10 ++++++----
7 files changed, 36 insertions(+), 29 deletions(-)
diffs (262 lines):
diff -r bf849d429934 -r 9a3d563cf36f sys/arch/sparc64/dev/iommu.c
--- a/sys/arch/sparc64/dev/iommu.c Fri Feb 11 14:24:47 2005 +0000
+++ b/sys/arch/sparc64/dev/iommu.c Sat Feb 12 12:26:27 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iommu.c,v 1.75 2004/07/01 06:40:36 petrov Exp $ */
+/* $NetBSD: iommu.c,v 1.75.6.1 2005/02/12 12:32:18 yamt Exp $ */
/*
* Copyright (c) 2001, 2002 Eduardo Horvath
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iommu.c,v 1.75 2004/07/01 06:40:36 petrov Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iommu.c,v 1.75.6.1 2005/02/12 12:32:18 yamt Exp $");
#include "opt_ddb.h"
@@ -130,7 +130,7 @@
(paddr_t)PAGE_SIZE, (paddr_t)0, &pglist, 1, 0) != 0)
panic("iommu_init: no memory");
- va = uvm_km_valloc(kernel_map, size);
+ va = uvm_km_alloc(kernel_map, size, 0, UVM_KMF_VAONLY);
if (va == 0)
panic("iommu_init: no memory");
is->is_tsb = (int64_t *)va;
@@ -1059,7 +1059,7 @@
* into this space.
*/
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);
@@ -1116,5 +1116,5 @@
size = round_page(size);
pmap_kremove((vaddr_t)kva, size);
pmap_update(pmap_kernel());
- uvm_km_free(kernel_map, (vaddr_t)kva, size);
+ uvm_km_free(kernel_map, (vaddr_t)kva, size, UVM_KMF_VAONLY);
}
diff -r bf849d429934 -r 9a3d563cf36f sys/arch/sun3/sun3/bus_subr.c
--- a/sys/arch/sun3/sun3/bus_subr.c Fri Feb 11 14:24:47 2005 +0000
+++ b/sys/arch/sun3/sun3/bus_subr.c Sat Feb 12 12:26:27 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_subr.c,v 1.12 2005/01/22 15:36:10 chs Exp $ */
+/* $NetBSD: bus_subr.c,v 1.12.2.1 2005/02/12 12:26:27 yamt Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_subr.c,v 1.12 2005/01/22 15:36:10 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_subr.c,v 1.12.2.1 2005/02/12 12:26:27 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -164,7 +164,7 @@
pa |= PMAP_NC; /* non-cached */
/* Get some kernel virtual address space. */
- va = uvm_km_valloc_wait(kernel_map, sz);
+ va = uvm_km_alloc(kernel_map, sz, 0, UVM_KMF_VAONLY | UVM_KMF_WAITVA);
if (va == 0)
panic("bus_mapin");
@@ -192,5 +192,7 @@
sz += off;
sz = m68k_round_page(sz);
- uvm_km_free_wakeup(kernel_map, va, sz);
+ pmap_remove(pmap_kernel(), va, va + sz);
+ pmap_update(pmap_kernel());
+ uvm_km_free(kernel_map, va, sz, UVM_KMF_VAONLY);
}
diff -r bf849d429934 -r 9a3d563cf36f sys/arch/sun3/sun3/dvma.c
--- a/sys/arch/sun3/sun3/dvma.c Fri Feb 11 14:24:47 2005 +0000
+++ b/sys/arch/sun3/sun3/dvma.c Sat Feb 12 12:26:27 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dvma.c,v 1.26 2005/01/22 15:36:10 chs Exp $ */
+/* $NetBSD: dvma.c,v 1.26.2.1 2005/02/12 12:26:27 yamt Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dvma.c,v 1.26 2005/01/22 15:36:10 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dvma.c,v 1.26.2.1 2005/02/12 12:26:27 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -98,7 +98,8 @@
* The remainder of phys_map is used for DVMA scratch
* memory pages (i.e. driver control blocks, etc.)
*/
- segmap_addr = uvm_km_valloc_wait(phys_map, dvma_segmap_size);
+ segmap_addr = uvm_km_alloc(phys_map, dvma_segmap_size, 0,
+ UVM_KMF_VAONLY | UVM_KMF_WAITVA);
if (segmap_addr != DVMA_MAP_BASE)
panic("dvma_init: unable to allocate DVMA segments");
@@ -124,7 +125,7 @@
if (!bytes)
return NULL;
new_size = m68k_round_page(bytes);
- new_mem = (caddr_t) uvm_km_alloc(phys_map, new_size);
+ new_mem = (caddr_t) uvm_km_alloc(phys_map, new_size, 0, UVM_KMF_WIRED);
if (!new_mem)
panic("dvma_malloc: no space in phys_map");
/* The pmap code always makes DVMA pages non-cached. */
@@ -139,7 +140,7 @@
{
vsize_t sz = m68k_round_page(size);
- uvm_km_free(phys_map, (vaddr_t)addr, sz);
+ uvm_km_free(phys_map, (vaddr_t)addr, sz, UVM_KMF_WIRED);
}
/*
diff -r bf849d429934 -r 9a3d563cf36f sys/arch/sun3/sun3/machdep.c
--- a/sys/arch/sun3/sun3/machdep.c Fri Feb 11 14:24:47 2005 +0000
+++ b/sys/arch/sun3/sun3/machdep.c Sat Feb 12 12:26:27 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.173 2005/01/22 15:36:10 chs Exp $ */
+/* $NetBSD: machdep.c,v 1.173.2.1 2005/02/12 12:26:27 yamt Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.173 2005/01/22 15:36:10 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.173.2.1 2005/02/12 12:26:27 yamt Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -250,7 +250,8 @@
/*
* Get scratch page for dumpsys().
*/
- if ((dumppage = uvm_km_alloc(kernel_map, PAGE_SIZE)) == 0)
+ dumppage = uvm_km_alloc(kernel_map, PAGE_SIZE, 0, UVM_KMF_WIRED);
+ if (dumppage == 0)
panic("startup: alloc dumppage");
@@ -283,7 +284,8 @@
* This page is handed to pmap_enter() therefore
* it has to be in the normal kernel VA range.
*/
- vmmap = uvm_km_valloc_wait(kernel_map, PAGE_SIZE);
+ vmmap = uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
+ UVM_KMF_VAONLY | UVM_KMF_WAITVA);
/*
* Create the DVMA maps.
diff -r bf849d429934 -r 9a3d563cf36f sys/arch/sun3/sun3x/bus_subr.c
--- a/sys/arch/sun3/sun3x/bus_subr.c Fri Feb 11 14:24:47 2005 +0000
+++ b/sys/arch/sun3/sun3x/bus_subr.c Sat Feb 12 12:26:27 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_subr.c,v 1.26 2005/01/22 15:36:10 chs Exp $ */
+/* $NetBSD: bus_subr.c,v 1.26.2.1 2005/02/12 12:26:27 yamt Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_subr.c,v 1.26 2005/01/22 15:36:10 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_subr.c,v 1.26.2.1 2005/02/12 12:26:27 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -162,7 +162,7 @@
pa |= PMAP_NC; /* non-cached */
/* Get some kernel virtual address space. */
- va = uvm_km_valloc_wait(kernel_map, sz);
+ va = uvm_km_alloc(kernel_map, sz, 0, UVM_KMF_VAONLY | UVM_KMF_WAITVA);
if (va == 0)
panic("bus_mapin");
@@ -190,5 +190,5 @@
sz += off;
sz = m68k_round_page(sz);
- uvm_km_free_wakeup(kernel_map, va, sz);
+ uvm_km_free(kernel_map, va, sz, UVM_KMF_VAONLY);
}
diff -r bf849d429934 -r 9a3d563cf36f sys/arch/sun3/sun3x/dvma.c
--- a/sys/arch/sun3/sun3x/dvma.c Fri Feb 11 14:24:47 2005 +0000
+++ b/sys/arch/sun3/sun3x/dvma.c Sat Feb 12 12:26:27 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dvma.c,v 1.28 2005/01/22 15:36:10 chs Exp $ */
+/* $NetBSD: dvma.c,v 1.28.2.1 2005/02/12 12:26:27 yamt Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dvma.c,v 1.28 2005/01/22 15:36:10 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dvma.c,v 1.28.2.1 2005/02/12 12:26:27 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -273,7 +273,7 @@
if (!bytes)
return NULL;
new_size = m68k_round_page(bytes);
- new_mem = (void*)uvm_km_alloc(kernel_map, new_size);
+ new_mem = (void*)uvm_km_alloc(kernel_map, new_size, 0, UVM_KMF_WIRED);
if (!new_mem)
return NULL;
dvma_mem = dvma_mapin(new_mem, new_size, 1);
diff -r bf849d429934 -r 9a3d563cf36f sys/arch/sun3/sun3x/machdep.c
--- a/sys/arch/sun3/sun3x/machdep.c Fri Feb 11 14:24:47 2005 +0000
+++ b/sys/arch/sun3/sun3x/machdep.c Sat Feb 12 12:26:27 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.97 2005/01/22 15:36:11 chs Exp $ */
+/* $NetBSD: machdep.c,v 1.97.2.1 2005/02/12 12:26:27 yamt Exp $ */
/*
* Copyright (c) 1982, 1986, 1990, 1993
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.97 2005/01/22 15:36:11 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.97.2.1 2005/02/12 12:26:27 yamt Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -251,7 +251,8 @@
/*
* Get scratch page for dumpsys().
*/
- if ((dumppage = uvm_km_alloc(kernel_map, PAGE_SIZE)) == 0)
+ dumppage = uvm_km_alloc(kernel_map, PAGE_SIZE, UVM_KMF_WIRED);
+ if (dumppage == 0)
panic("startup: alloc dumppage");
minaddr = 0;
@@ -283,7 +284,8 @@
* This page is handed to pmap_enter() therefore
* it has to be in the normal kernel VA range.
*/
- vmmap = uvm_km_valloc_wait(kernel_map, PAGE_SIZE);
+ vmmap = uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
+ UVM_KMF_VAONLY | UVM_KMF_WAITVA);
/*
* Create the DVMA maps.
Home |
Main Index |
Thread Index |
Old Index