Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/yamt-km]: src/sys/arch/sh5/sh5 convert arch/sh5 to new apis.
details: https://anonhg.NetBSD.org/src/rev/5a07396cdfec
branches: yamt-km
changeset: 573324:5a07396cdfec
user: yamt <yamt%NetBSD.org@localhost>
date: Wed Feb 02 12:30:37 2005 +0000
description:
convert arch/sh5 to new apis.
diffstat:
sys/arch/sh5/sh5/bus_dma.c | 10 ++++++----
sys/arch/sh5/sh5/bus_space.c | 8 +++++---
sys/arch/sh5/sh5/pmap.c | 9 +++++----
sys/arch/sh5/sh5/vm_machdep.c | 8 ++++----
4 files changed, 20 insertions(+), 15 deletions(-)
diffs (140 lines):
diff -r 49317090d2e4 -r 5a07396cdfec sys/arch/sh5/sh5/bus_dma.c
--- a/sys/arch/sh5/sh5/bus_dma.c Wed Feb 02 12:30:18 2005 +0000
+++ b/sys/arch/sh5/sh5/bus_dma.c Wed Feb 02 12:30:37 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.12 2004/09/16 03:57:11 rumble Exp $ */
+/* $NetBSD: bus_dma.c,v 1.12.6.1 2005/02/02 12:30:37 yamt Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.12 2004/09/16 03:57:11 rumble Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.12.6.1 2005/02/02 12:30:37 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -747,7 +747,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);
@@ -792,7 +792,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 49317090d2e4 -r 5a07396cdfec sys/arch/sh5/sh5/bus_space.c
--- a/sys/arch/sh5/sh5/bus_space.c Wed Feb 02 12:30:18 2005 +0000
+++ b/sys/arch/sh5/sh5/bus_space.c Wed Feb 02 12:30:37 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_space.c,v 1.6 2004/02/13 11:36:17 wiz Exp $ */
+/* $NetBSD: bus_space.c,v 1.6.10.1 2005/02/02 12:30:37 yamt Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.6 2004/02/13 11:36:17 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.6.10.1 2005/02/02 12:30:37 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -301,7 +301,9 @@
return;
}
- uvm_km_free(kernel_map, va, size);
+ pmap_remove(pmap_kernel(), (vaddr_t)kva, (vaddr_t)kva + size);
+ pmap_update(pmap_kernel());
+ uvm_km_free(kernel_map, va, size, UVM_KMF_VAONLY);
}
/*ARGSUSED*/
diff -r 49317090d2e4 -r 5a07396cdfec sys/arch/sh5/sh5/pmap.c
--- a/sys/arch/sh5/sh5/pmap.c Wed Feb 02 12:30:18 2005 +0000
+++ b/sys/arch/sh5/sh5/pmap.c Wed Feb 02 12:30:37 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.35 2004/02/13 11:36:17 wiz Exp $ */
+/* $NetBSD: pmap.c,v 1.35.10.1 2005/02/02 12:30:37 yamt Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -103,7 +103,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.35 2004/02/13 11:36:17 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.35.10.1 2005/02/02 12:30:37 yamt Exp $");
#include "opt_ddb.h"
#include "opt_kernel_ipt.h"
@@ -1183,7 +1183,7 @@
panic("pmap_map_device: out of device bootstrap kva");
pmap_device_kva_start += len;
} else
- rv = va = uvm_km_valloc(kernel_map, len);
+ rv = va = uvm_km_alloc(kernel_map, len, 0, UVM_KMF_VAONLY);
while (len) {
idx = kva_to_iptidx(va);
@@ -2946,7 +2946,8 @@
if (uvm.page_init_done != TRUE)
return ((void *)uvm_pageboot_alloc(PAGE_SIZE));
- return ((void *)uvm_km_alloc_poolpage((flags & PR_WAITOK)?TRUE:FALSE));
+ return ((void *)uvm_km_alloc_poolpage(kmem_map,
+ (flags & PR_WAITOK) ? TRUE : FALSE));
}
static void
diff -r 49317090d2e4 -r 5a07396cdfec sys/arch/sh5/sh5/vm_machdep.c
--- a/sys/arch/sh5/sh5/vm_machdep.c Wed Feb 02 12:30:18 2005 +0000
+++ b/sys/arch/sh5/sh5/vm_machdep.c Wed Feb 02 12:30:37 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.10 2004/09/17 14:11:22 skrll Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.10.6.1 2005/02/02 12:30:37 yamt Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.10 2004/09/17 14:11:22 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.10.6.1 2005/02/02 12:30:37 yamt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -264,7 +264,7 @@
uva = sh5_trunc_page(bp->b_saveaddr = bp->b_data);
off = (vaddr_t)bp->b_data - uva;
len = sh5_round_page(off + len);
- kva = uvm_km_valloc_wait(phys_map, len);
+ kva = uvm_km_alloc(phys_map, len, 0, UVM_KMF_VAONLY | UVM_KMF_WAITVA);
bp->b_data = (caddr_t)(kva + off);
upmap = vm_map_pmap(&bp->b_proc->p_vmspace->vm_map);
@@ -296,7 +296,7 @@
len = sh5_round_page(off + len);
pmap_kremove(kva, len);
pmap_update(pmap_kernel());
- uvm_km_free_wakeup(phys_map, kva, len);
+ uvm_km_free_wakeup(phys_map, kva, len, UVM_KMF_VAONLY);
bp->b_data = bp->b_saveaddr;
bp->b_saveaddr = 0;
}
Home |
Main Index |
Thread Index |
Old Index