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/2785bfbc7367
branches:  yamt-km
changeset: 573332:2785bfbc7367
user:      yamt <yamt%NetBSD.org@localhost>
date:      Fri Feb 11 14:03:32 2005 +0000

description:
use new apis.

diffstat:

 sys/arch/mipsco/mipsco/bus_dma.c   |  11 ++++++-----
 sys/arch/mvme68k/mvme68k/bus_dma.c |  10 ++++++----
 sys/arch/newsmips/newsmips/bus.c   |  10 ++++++----
 3 files changed, 18 insertions(+), 13 deletions(-)

diffs (115 lines):

diff -r b2b3aa0b3a6a -r 2785bfbc7367 sys/arch/mipsco/mipsco/bus_dma.c
--- a/sys/arch/mipsco/mipsco/bus_dma.c  Fri Feb 11 14:02:18 2005 +0000
+++ b/sys/arch/mipsco/mipsco/bus_dma.c  Fri Feb 11 14:03:32 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_dma.c,v 1.14 2004/11/28 17:34:46 thorpej Exp $     */
+/*     $NetBSD: bus_dma.c,v 1.14.6.1 2005/02/11 14:03:32 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.14 2004/11/28 17:34:46 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.14.6.1 2005/02/11 14:03:32 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -682,7 +682,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);
@@ -732,8 +732,9 @@
            kva < (caddr_t)MIPS_KSEG2_START)
                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);
 }
 
 /*
diff -r b2b3aa0b3a6a -r 2785bfbc7367 sys/arch/mvme68k/mvme68k/bus_dma.c
--- a/sys/arch/mvme68k/mvme68k/bus_dma.c        Fri Feb 11 14:02:18 2005 +0000
+++ b/sys/arch/mvme68k/mvme68k/bus_dma.c        Fri Feb 11 14:03:32 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.26 2004/11/28 17:34:46 thorpej Exp $ */
+/* $NetBSD: bus_dma.c,v 1.26.6.1 2005/02/11 14:09:34 yamt Exp $        */
 
 /*
  * This file was taken from from next68k/dev/bus_dma.c, which was originally
@@ -46,7 +46,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.26 2004/11/28 17:34:46 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.26.6.1 2005/02/11 14:09:34 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -754,7 +754,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);
@@ -816,7 +816,9 @@
        for (s = 0, va = kva; s < size; s += PAGE_SIZE, va += PAGE_SIZE)
                _pmap_set_page_cacheable(pmap_kernel(), (vaddr_t)va);
 
-       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 b2b3aa0b3a6a -r 2785bfbc7367 sys/arch/newsmips/newsmips/bus.c
--- a/sys/arch/newsmips/newsmips/bus.c  Fri Feb 11 14:02:18 2005 +0000
+++ b/sys/arch/newsmips/newsmips/bus.c  Fri Feb 11 14:03:32 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus.c,v 1.17 2004/11/28 17:34:46 thorpej Exp $ */
+/*     $NetBSD: bus.c,v 1.17.6.1 2005/02/11 14:11:01 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.17 2004/11/28 17:34:46 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.17.6.1 2005/02/11 14:11:01 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -878,7 +878,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);
@@ -928,7 +928,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