Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm malloc -> kmem



details:   https://anonhg.NetBSD.org/src/rev/5a8825db5d11
branches:  trunk
changeset: 370743:5a8825db5d11
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Sep 27 06:32:53 2022 +0000

description:
malloc -> kmem

diffstat:

 sys/arch/arm/at91/at91cf.c   |  10 +++++-----
 sys/arch/arm/ep93xx/eppcic.c |   8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diffs (68 lines):

diff -r 787431b76c23 -r 5a8825db5d11 sys/arch/arm/at91/at91cf.c
--- a/sys/arch/arm/at91/at91cf.c        Tue Sep 27 06:12:58 2022 +0000
+++ b/sys/arch/arm/at91/at91cf.c        Tue Sep 27 06:32:53 2022 +0000
@@ -1,5 +1,5 @@
-/*     $Id: at91cf.c,v 1.7 2021/08/07 16:18:43 thorpej Exp $   */
-/*     $NetBSD: at91cf.c,v 1.7 2021/08/07 16:18:43 thorpej Exp $       */
+/*     $Id: at91cf.c,v 1.8 2022/09/27 06:34:44 skrll Exp $     */
+/*     $NetBSD: at91cf.c,v 1.8 2022/09/27 06:34:44 skrll Exp $ */
 
 /*
  * Copyright (c) 2007 Embedtronics Oy. All rights reserved.
@@ -30,12 +30,12 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at91cf.c,v 1.7 2021/08/07 16:18:43 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91cf.c,v 1.8 2022/09/27 06:34:44 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
 #include <sys/device.h>
 #include <sys/kthread.h>
 #include <uvm/uvm_param.h>
@@ -174,7 +174,7 @@
        printf("\n");
 
        /* socket 0 */
-       ph = malloc(sizeof(struct at91cf_handle), M_DEVBUF, M_WAITOK|M_ZERO);
+       ph = kmem_zalloc(sizeof(*ph), KM_SLEEP);
        sc->sc_ph = ph;
        ph->ph_sc = sc;
        ph->ph_space[IO].base = sa->sa_addr + IO_BASE;
diff -r 787431b76c23 -r 5a8825db5d11 sys/arch/arm/ep93xx/eppcic.c
--- a/sys/arch/arm/ep93xx/eppcic.c      Tue Sep 27 06:12:58 2022 +0000
+++ b/sys/arch/arm/ep93xx/eppcic.c      Tue Sep 27 06:32:53 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: eppcic.c,v 1.11 2021/11/21 08:25:26 skrll Exp $        */
+/*     $NetBSD: eppcic.c,v 1.12 2022/09/27 06:32:53 skrll Exp $        */
 
 /*
  * Copyright (c) 2005 HAMAJIMA Katsuomi. All rights reserved.
@@ -26,12 +26,12 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: eppcic.c,v 1.11 2021/11/21 08:25:26 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: eppcic.c,v 1.12 2022/09/27 06:32:53 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
-#include <sys/malloc.h>
+#include <sys/kmem.h>
 #include <sys/device.h>
 #include <sys/kthread.h>
 #include <uvm/uvm_param.h>
@@ -175,7 +175,7 @@
        epled_red_off();
 #endif
        /* socket 0 */
-       ph = malloc(sizeof(struct eppcic_handle), M_DEVBUF, M_WAITOK);
+       ph = kmem_alloc(sizeof(*ph), KM_SLEEP);
        sc->sc_ph[0] = ph;
        ph->ph_sc = sc;
        ph->ph_socket = 0;



Home | Main Index | Thread Index | Old Index