Module Name: src
Committed By: thorpej
Date: Mon Jan 4 17:35:12 UTC 2021
Modified Files:
src/sys/arch/mips/alchemy: au_himem_space.c au_icu.c au_wired_space.c
Log Message:
malloc(9) -> kmem(9)
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/mips/alchemy/au_himem_space.c
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/mips/alchemy/au_icu.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/mips/alchemy/au_wired_space.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/mips/alchemy/au_himem_space.c
diff -u src/sys/arch/mips/alchemy/au_himem_space.c:1.15 src/sys/arch/mips/alchemy/au_himem_space.c:1.16
--- src/sys/arch/mips/alchemy/au_himem_space.c:1.15 Sun Nov 10 21:16:29 2019
+++ src/sys/arch/mips/alchemy/au_himem_space.c Mon Jan 4 17:35:12 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: au_himem_space.c,v 1.15 2019/11/10 21:16:29 chs Exp $ */
+/* $NetBSD: au_himem_space.c,v 1.16 2021/01/04 17:35:12 thorpej Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: au_himem_space.c,v 1.15 2019/11/10 21:16:29 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: au_himem_space.c,v 1.16 2021/01/04 17:35:12 thorpej Exp $");
/*
* This provides mappings for the upper I/O regions used on some
@@ -73,7 +73,7 @@ __KERNEL_RCSID(0, "$NetBSD: au_himem_spa
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/extent.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
#include <sys/endian.h>
#include <uvm/uvm.h>
@@ -692,8 +692,7 @@ au_himem_space_init(bus_space_tag_t bst,
{
au_himem_cookie_t *c;
- c = malloc(sizeof (struct au_himem_cookie), M_DEVBUF,
- M_WAITOK | M_ZERO);
+ c = kmem_zalloc(sizeof (struct au_himem_cookie), KM_SLEEP);
c->c_name = name;
c->c_start = start;
c->c_end = end;
Index: src/sys/arch/mips/alchemy/au_icu.c
diff -u src/sys/arch/mips/alchemy/au_icu.c:1.30 src/sys/arch/mips/alchemy/au_icu.c:1.31
--- src/sys/arch/mips/alchemy/au_icu.c:1.30 Sun Nov 10 21:16:29 2019
+++ src/sys/arch/mips/alchemy/au_icu.c Mon Jan 4 17:35:12 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: au_icu.c,v 1.30 2019/11/10 21:16:29 chs Exp $ */
+/* $NetBSD: au_icu.c,v 1.31 2021/01/04 17:35:12 thorpej Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: au_icu.c,v 1.30 2019/11/10 21:16:29 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: au_icu.c,v 1.31 2021/01/04 17:35:12 thorpej Exp $");
#include "opt_ddb.h"
#define __INTR_PRIVATE
@@ -78,7 +78,7 @@ __KERNEL_RCSID(0, "$NetBSD: au_icu.c,v 1
#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 <mips/locore.h>
@@ -199,7 +199,7 @@ au_intr_establish(int irq, int req, int
if (req > 1)
panic("au_intr_establish: bogus request %d", req);
- 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;
@@ -305,7 +305,7 @@ au_intr_disestablish(void *cookie)
splx(s);
- free(ih, M_DEVBUF);
+ kmem_free(ih, sizeof(*ih));
}
void
Index: src/sys/arch/mips/alchemy/au_wired_space.c
diff -u src/sys/arch/mips/alchemy/au_wired_space.c:1.10 src/sys/arch/mips/alchemy/au_wired_space.c:1.11
--- src/sys/arch/mips/alchemy/au_wired_space.c:1.10 Sun Nov 10 21:16:29 2019
+++ src/sys/arch/mips/alchemy/au_wired_space.c Mon Jan 4 17:35:12 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: au_wired_space.c,v 1.10 2019/11/10 21:16:29 chs Exp $ */
+/* $NetBSD: au_wired_space.c,v 1.11 2021/01/04 17:35:12 thorpej Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: au_wired_space.c,v 1.10 2019/11/10 21:16:29 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: au_wired_space.c,v 1.11 2021/01/04 17:35:12 thorpej Exp $");
/*
* This provides mappings for the upper I/O regions used on some
@@ -72,7 +72,7 @@ __KERNEL_RCSID(0, "$NetBSD: au_wired_spa
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/extent.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
#include <sys/endian.h>
#include <sys/bus.h>
@@ -632,8 +632,7 @@ au_wired_space_init(bus_space_tag_t bst,
{
au_wired_cookie_t *c;
- c = malloc(sizeof (struct au_wired_cookie), M_DEVBUF,
- M_WAITOK | M_ZERO);
+ c = kmem_zalloc(sizeof (struct au_wired_cookie), KM_SLEEP);
c->c_pbase = paddr;
c->c_name = name;
c->c_start = start;