Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/be1e42dc70c6
branches:  yamt-km
changeset: 573295:be1e42dc70c6
user:      yamt <yamt%NetBSD.org@localhost>
date:      Tue Jan 25 13:03:14 2005 +0000

description:
convert to new apis.

diffstat:

 sys/dev/ic/sti.c  |  10 ++++++----
 sys/dev/md.c      |   6 +++---
 sys/dev/pci/twe.c |  13 +++++++------
 3 files changed, 16 insertions(+), 13 deletions(-)

diffs (113 lines):

diff -r 7a23177ece52 -r be1e42dc70c6 sys/dev/ic/sti.c
--- a/sys/dev/ic/sti.c  Tue Jan 25 13:02:00 2005 +0000
+++ b/sys/dev/ic/sti.c  Tue Jan 25 13:03:14 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sti.c,v 1.2 2004/09/19 23:00:29 chs Exp $ */
+/* $NetBSD: sti.c,v 1.2.6.1 2005/01/25 13:03:14 yamt Exp $ */
 
 /*     $OpenBSD: sti.c,v 1.35 2003/12/16 06:07:13 mickey Exp $ */
 
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.2 2004/09/19 23:00:29 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.2.6.1 2005/01/25 13:03:14 yamt Exp $");
 
 #include "wsdisplay.h"
 
@@ -214,7 +214,8 @@
        size = dd->dd_pacode[i] - dd->dd_pacode[STI_BEGIN];
        if (sc->sc_devtype == STI_DEVTYPE1)
                size = (size + 3) / 4;
-       if (!(sc->sc_code = uvm_km_alloc1(kernel_map, round_page(size), 0))) {
+       if (!(sc->sc_code = uvm_km_alloc(kernel_map, round_page(size), 0,
+           UVM_KMF_WIRED))) {
                printf(": cannot allocate %u bytes for code\n", size);
                return;
        }
@@ -255,7 +256,8 @@
        if ((error = uvm_map_protect(kernel_map, sc->sc_code,
            sc->sc_code + round_page(size), UVM_PROT_RX, FALSE))) {
                printf(": uvm_map_protect failed (%d)\n", error);
-               uvm_km_free(kernel_map, sc->sc_code, round_page(size));
+               uvm_km_free(kernel_map, sc->sc_code, round_page(size),
+                   UVM_KMF_WIRED);
                return;
        }
 
diff -r 7a23177ece52 -r be1e42dc70c6 sys/dev/md.c
--- a/sys/dev/md.c      Tue Jan 25 13:02:00 2005 +0000
+++ b/sys/dev/md.c      Tue Jan 25 13:03:14 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.39 2004/10/28 07:07:39 yamt Exp $     */
+/*     $NetBSD: md.c,v 1.39.6.1 2005/01/25 13:03:14 yamt Exp $ */
 
 /*
  * Copyright (c) 1995 Gordon W. Ross, Leo Weppelman.
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.39 2004/10/28 07:07:39 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.39.6.1 2005/01/25 13:03:14 yamt Exp $");
 
 #include "opt_md.h"
 
@@ -416,7 +416,7 @@
 
        /* Sanity check the size. */
        size = umd->md_size;
-       addr = uvm_km_zalloc(kernel_map, size);
+       addr = uvm_km_alloc(kernel_map, size, 0, UVM_KMF_WIRED|UVM_KMF_ZERO);
        if (!addr)
                return ENOMEM;
 
diff -r 7a23177ece52 -r be1e42dc70c6 sys/dev/pci/twe.c
--- a/sys/dev/pci/twe.c Tue Jan 25 13:02:00 2005 +0000
+++ b/sys/dev/pci/twe.c Tue Jan 25 13:03:14 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: twe.c,v 1.60 2004/09/23 01:16:34 heas Exp $    */
+/*     $NetBSD: twe.c,v 1.60.6.1 2005/01/25 13:03:14 yamt Exp $        */
 
 /*-
  * Copyright (c) 2000, 2001, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.60 2004/09/23 01:16:34 heas Exp $");
+__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.60.6.1 2005/01/25 13:03:14 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1460,8 +1460,8 @@
        if (((u_long)ccb->ccb_data & (TWE_ALIGNMENT - 1)) != 0) {
                s = splvm();
                /* XXX */
-               ccb->ccb_abuf = uvm_km_kmemalloc(kmem_map, NULL,
-                   ccb->ccb_datasize, UVM_KMF_NOWAIT);
+               ccb->ccb_abuf = uvm_km_alloc(kmem_map,
+                   ccb->ccb_datasize, 0, UVM_KMF_NOWAIT|UVM_KMF_WIRED);
                splx(s);
                data = (void *)ccb->ccb_abuf;
                if ((ccb->ccb_flags & TWE_CCB_DATA_OUT) != 0)
@@ -1483,7 +1483,7 @@
                        s = splvm();
                        /* XXX */
                        uvm_km_free(kmem_map, ccb->ccb_abuf,
-                           ccb->ccb_datasize);
+                           ccb->ccb_datasize, UVM_KMF_WIRED);
                        splx(s);
                }
                return (rv);
@@ -1568,7 +1568,8 @@
                            ccb->ccb_datasize);
                s = splvm();
                /* XXX */
-               uvm_km_free(kmem_map, ccb->ccb_abuf, ccb->ccb_datasize);
+               uvm_km_free(kmem_map, ccb->ccb_abuf, ccb->ccb_datasize,
+                   UVM_KMF_WIRED);
                splx(s);
        }
 }



Home | Main Index | Thread Index | Old Index