Module Name: src
Committed By: chs
Date: Sat Oct 27 17:29:03 UTC 2012
Modified Files:
src/sys/arch/ia64/ia64: sapic.c
Log Message:
malloc -> kmem_zalloc. this also fixes a build error.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/ia64/sapic.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/ia64/ia64/sapic.c
diff -u src/sys/arch/ia64/ia64/sapic.c:1.1 src/sys/arch/ia64/ia64/sapic.c:1.2
--- src/sys/arch/ia64/ia64/sapic.c:1.1 Mon Jul 20 04:41:36 2009
+++ src/sys/arch/ia64/ia64/sapic.c Sat Oct 27 17:29:03 2012
@@ -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 @@ sapic_create(u_int id, u_int base, uint6
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;