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 -> kmem_zalloc. this also fixes a...



details:   https://anonhg.NetBSD.org/src/rev/765d2f82e834
branches:  trunk
changeset: 782312:765d2f82e834
user:      chs <chs%NetBSD.org@localhost>
date:      Sat Oct 27 17:29:03 2012 +0000

description:
malloc -> kmem_zalloc.  this also fixes a build error.

diffstat:

 sys/arch/ia64/ia64/sapic.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (36 lines):

diff -r abedb86f4635 -r 765d2f82e834 sys/arch/ia64/ia64/sapic.c
--- a/sys/arch/ia64/ia64/sapic.c        Sat Oct 27 17:24:37 2012 +0000
+++ b/sys/arch/ia64/ia64/sapic.c        Sat Oct 27 17:29:03 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sapic.c,v 1.1 2009/07/20 04:41:36 kiyohara Exp $       */
+/*     $NetBSD: sapic.c,v 1.2 2012/10/27 17:29:03 chs Exp $    */
 /*-
  * Copyright (c) 2001 Doug Rabson
  * All rights reserved.
@@ -30,7 +30,7 @@
 #include "opt_ddb.h"
 
 #include <sys/param.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
 #include <sys/kernel.h>
 #include <sys/systm.h>
 #include <sys/bus.h>
@@ -44,8 +44,6 @@
 #include <machine/sapicvar.h>
 
 
-static MALLOC_DEFINE(M_SAPIC, "sapic", "I/O SAPIC devices");
-
 struct sapic *ia64_sapics[16]; /* XXX make this resizable */
 static int ia64_sapic_count;
 
@@ -146,7 +144,7 @@
        struct sapic *sa;
        u_int i;
 
-       sa = malloc(sizeof(struct sapic), M_SAPIC, M_ZERO | M_NOWAIT);
+       sa = kmem_zalloc(sizeof(struct sapic), KM_NOSLEEP);
        if (sa == NULL)
                return NULL;
 



Home | Main Index | Thread Index | Old Index