Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/algor malloc(9) -> kmem(9)



details:   https://anonhg.NetBSD.org/src/rev/7674d6eeb233
branches:  trunk
changeset: 1016252:7674d6eeb233
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Nov 14 02:23:04 2020 +0000

description:
malloc(9) -> kmem(9)

diffstat:

 sys/arch/algor/algor/algor_p4032_intr.c |  10 +++++-----
 sys/arch/algor/algor/algor_p5064_intr.c |  10 +++++-----
 sys/arch/algor/algor/algor_p6032_intr.c |  10 +++++-----
 sys/arch/algor/pci/pcib.c               |  10 +++++-----
 4 files changed, 20 insertions(+), 20 deletions(-)

diffs (180 lines):

diff -r dd13f4e89894 -r 7674d6eeb233 sys/arch/algor/algor/algor_p4032_intr.c
--- a/sys/arch/algor/algor/algor_p4032_intr.c   Fri Nov 13 19:45:24 2020 +0000
+++ b/sys/arch/algor/algor/algor_p4032_intr.c   Sat Nov 14 02:23:04 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: algor_p4032_intr.c,v 1.26 2019/11/10 21:16:21 chs Exp $        */
+/*     $NetBSD: algor_p4032_intr.c,v 1.27 2020/11/14 02:23:04 thorpej Exp $    */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: algor_p4032_intr.c,v 1.26 2019/11/10 21:16:21 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: algor_p4032_intr.c,v 1.27 2020/11/14 02:23:04 thorpej Exp $");
 
 #include "opt_ddb.h"
 #define        __INTR_PRIVATE
@@ -49,7 +49,7 @@
 #include <sys/device.h>
 #include <sys/intr.h>
 #include <sys/kernel.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
 #include <sys/queue.h>
 #include <sys/systm.h>
 
@@ -352,7 +352,7 @@
 
        KASSERT(irq == irqmap->irqidx);
 
-       ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK);
+       ih = kmem_alloc(sizeof(*ih), KM_SLEEP);
        ih->ih_func = func;
        ih->ih_arg = arg;
        ih->ih_irq = 0;
@@ -408,7 +408,7 @@
 
        splx(s);
 
-       free(ih, M_DEVBUF);
+       kmem_free(ih, sizeof(*ih));
 }
 
 void
diff -r dd13f4e89894 -r 7674d6eeb233 sys/arch/algor/algor/algor_p5064_intr.c
--- a/sys/arch/algor/algor/algor_p5064_intr.c   Fri Nov 13 19:45:24 2020 +0000
+++ b/sys/arch/algor/algor/algor_p5064_intr.c   Sat Nov 14 02:23:04 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: algor_p5064_intr.c,v 1.29 2019/11/10 21:16:21 chs Exp $        */
+/*     $NetBSD: algor_p5064_intr.c,v 1.30 2020/11/14 02:23:04 thorpej Exp $    */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: algor_p5064_intr.c,v 1.29 2019/11/10 21:16:21 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: algor_p5064_intr.c,v 1.30 2020/11/14 02:23:04 thorpej Exp $");
 
 #include "opt_ddb.h"
 #define        __INTR_PRIVATE
@@ -49,7 +49,7 @@
 #include <sys/device.h>
 #include <sys/intr.h>
 #include <sys/kernel.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
 #include <sys/queue.h>
 #include <sys/systm.h>
 
@@ -445,7 +445,7 @@
 
        KASSERT(irq == irqmap->irqidx);
 
-       ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK);
+       ih = kmem_alloc(sizeof(*ih), KM_SLEEP);
        ih->ih_func = func;
        ih->ih_arg = arg;
        ih->ih_irq = 0;
@@ -501,7 +501,7 @@
 
        splx(s);
 
-       free(ih, M_DEVBUF);
+       kmem_free(ih, sizeof(*ih));
 }
 
 void
diff -r dd13f4e89894 -r 7674d6eeb233 sys/arch/algor/algor/algor_p6032_intr.c
--- a/sys/arch/algor/algor/algor_p6032_intr.c   Fri Nov 13 19:45:24 2020 +0000
+++ b/sys/arch/algor/algor/algor_p6032_intr.c   Sat Nov 14 02:23:04 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: algor_p6032_intr.c,v 1.23 2019/11/10 21:16:21 chs Exp $        */
+/*     $NetBSD: algor_p6032_intr.c,v 1.24 2020/11/14 02:23:04 thorpej Exp $    */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: algor_p6032_intr.c,v 1.23 2019/11/10 21:16:21 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: algor_p6032_intr.c,v 1.24 2020/11/14 02:23:04 thorpej Exp $");
 
 #include "opt_ddb.h"
 #define        __INTR_PRIVATE
@@ -48,7 +48,7 @@
 #include <sys/device.h>
 #include <sys/intr.h>
 #include <sys/kernel.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
 #include <sys/queue.h>
 #include <sys/systm.h>
 
@@ -313,7 +313,7 @@
 
        KASSERT(irq == irqmap->irqidx);
 
-       ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK);
+       ih = kmem_alloc(sizeof(*ih), KM_SLEEP);
        ih->ih_func = func;
        ih->ih_arg = arg;
        ih->ih_irq = 0;
@@ -365,7 +365,7 @@
 
        splx(s);
 
-       free(ih, M_DEVBUF);
+       kmem_free(ih, sizeof(*ih));
 }
 
 void
diff -r dd13f4e89894 -r 7674d6eeb233 sys/arch/algor/pci/pcib.c
--- a/sys/arch/algor/pci/pcib.c Fri Nov 13 19:45:24 2020 +0000
+++ b/sys/arch/algor/pci/pcib.c Sat Nov 14 02:23:04 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pcib.c,v 1.25 2019/11/10 21:16:22 chs Exp $    */
+/*     $NetBSD: pcib.c,v 1.26 2020/11/14 02:23:04 thorpej Exp $        */
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.25 2019/11/10 21:16:22 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.26 2020/11/14 02:23:04 thorpej Exp $");
 
 #include "opt_algor_p5064.h" 
 #include "opt_algor_p6032.h"
@@ -41,7 +41,7 @@
 #include <sys/device.h>
 #include <sys/intr.h>
 #include <sys/kernel.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
 #include <sys/systm.h>
 
 #include <algor/autoconf.h>
@@ -449,7 +449,7 @@
                return (NULL);
        }
 
-       ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK);
+       ih = kmem_alloc(sizeof(*ih), KM_SLEEP);
        ih->ih_func = func;
        ih->ih_arg = arg;
        ih->ih_irq = irq;
@@ -501,7 +501,7 @@
 
        splx(s);
 
-       free(ih, M_DEVBUF);
+       kmem_free(ih, sizeof(*ih));
 }
 
 int



Home | Main Index | Thread Index | Old Index