Module Name: src Committed By: thorpej Date: Sat Nov 21 15:26:54 UTC 2020
Modified Files: src/sys/arch/cobalt/cobalt: interrupt.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/cobalt/cobalt/interrupt.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/cobalt/cobalt/interrupt.c diff -u src/sys/arch/cobalt/cobalt/interrupt.c:1.10 src/sys/arch/cobalt/cobalt/interrupt.c:1.11 --- src/sys/arch/cobalt/cobalt/interrupt.c:1.10 Sun Nov 10 21:16:25 2019 +++ src/sys/arch/cobalt/cobalt/interrupt.c Sat Nov 21 15:26:53 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: interrupt.c,v 1.10 2019/11/10 21:16:25 chs Exp $ */ +/* $NetBSD: interrupt.c,v 1.11 2020/11/21 15:26:53 thorpej Exp $ */ /*- * Copyright (c) 2006 Izumi Tsutsui. All rights reserved. @@ -79,12 +79,12 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.10 2019/11/10 21:16:25 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.11 2020/11/21 15:26:53 thorpej Exp $"); #define __INTR_PRIVATE #include <sys/param.h> -#include <sys/malloc.h> +#include <sys/kmem.h> #include <sys/cpu.h> #include <sys/intr.h> @@ -265,7 +265,7 @@ icu_intr_establish(int irq, int type, in 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_irq = irq; @@ -306,7 +306,7 @@ icu_intr_disestablish(void *cookie) icu_set(); } splx(s); - free(ih, M_DEVBUF); + kmem_free(ih, sizeof(*ih)); } }