Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/75cd0a696be8
branches:  trunk
changeset: 957225:75cd0a696be8
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Nov 21 20:50:08 2020 +0000

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

diffstat:

 sys/arch/ia64/ia64/interrupt.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (58 lines):

diff -r 0bac57f61086 -r 75cd0a696be8 sys/arch/ia64/ia64/interrupt.c
--- a/sys/arch/ia64/ia64/interrupt.c    Sat Nov 21 20:20:31 2020 +0000
+++ b/sys/arch/ia64/ia64/interrupt.c    Sat Nov 21 20:50:08 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: interrupt.c,v 1.10 2019/11/10 21:16:28 chs Exp $ */
+/* $NetBSD: interrupt.c,v 1.11 2020/11/21 20:50:08 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.10 2019/11/10 21:16:28 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.11 2020/11/21 20:50:08 thorpej Exp $");
 
 #include "opt_ddb.h"
 
@@ -41,7 +41,7 @@
 #include <sys/evcnt.h>
 #include <sys/lwp.h>
 #include <sys/proc.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
 #include <sys/sched.h>
 
 #include <machine/clock.h>
@@ -293,7 +293,7 @@
 
        i = ia64_intrs[vector];
        if (i == NULL) {
-               i = malloc(sizeof(struct ia64_intr), M_DEVBUF, M_WAITOK);
+               i = kmem_alloc(sizeof(struct ia64_intr), KM_SLEEP);
                i->irq = irq;
                i->sapic = sa;
                i->type = type;
@@ -309,7 +309,7 @@
                if (i->type != type)
                        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_level = level;
@@ -334,10 +334,10 @@
 
                ia64_intrs[vector] = NULL;
                evcnt_detach(&i->evcnt);
-               free(i, M_DEVBUF);
+               kmem_free(i, sizeof(*i));
        }
 
-       free(ih, M_DEVBUF);
+       kmem_free(ih, sizeof(*ih));
 }
 
 static int



Home | Main Index | Thread Index | Old Index