Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/yamt-km]: src/sys/arch/pmax/pmax convert arch/pmax to new apis.



details:   https://anonhg.NetBSD.org/src/rev/3988d2087cee
branches:  yamt-km
changeset: 573302:3988d2087cee
user:      yamt <yamt%NetBSD.org@localhost>
date:      Wed Jan 26 11:59:24 2005 +0000

description:
convert arch/pmax to new apis.

diffstat:

 sys/arch/pmax/pmax/bus_dma.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r 8585ea5f677c -r 3988d2087cee sys/arch/pmax/pmax/bus_dma.c
--- a/sys/arch/pmax/pmax/bus_dma.c      Wed Jan 26 11:58:53 2005 +0000
+++ b/sys/arch/pmax/pmax/bus_dma.c      Wed Jan 26 11:59:24 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_dma.c,v 1.40 2004/11/28 17:34:46 thorpej Exp $     */
+/*     $NetBSD: bus_dma.c,v 1.40.6.1 2005/01/26 11:59:24 yamt Exp $    */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.40 2004/11/28 17:34:46 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.40.6.1 2005/01/26 11:59:24 yamt Exp $");
 
 #include "opt_cputype.h"
 
@@ -819,7 +819,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);
@@ -869,7 +869,9 @@
                return;
 
        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);
 }
 
 /*



Home | Main Index | Thread Index | Old Index