diff --git a/sys/arch/sparc64/dev/psycho.c b/sys/arch/sparc64/dev/psycho.c index b7e68120f95b..9e4e64227cdb 100644 --- a/sys/arch/sparc64/dev/psycho.c +++ b/sys/arch/sparc64/dev/psycho.c @@ -1,4 +1,4 @@ -/* $NetBSD: psycho.c,v 1.130 2021/01/06 20:04:30 palle Exp $ */ +/* $NetBSD: psycho.c,v 1.131 2021/01/07 07:40:39 nakayama Exp $ */ /* * Copyright (c) 1999, 2000 Matthew R. Green @@ -55,7 +55,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: psycho.c,v 1.130 2021/01/06 20:04:30 palle Exp $"); +__KERNEL_RCSID(0, "$NetBSD: psycho.c,v 1.131 2021/01/07 07:40:39 nakayama Exp $"); #include "opt_ddb.h" @@ -81,6 +81,7 @@ int psycho_debug = 0x0; #include #include #include +#include #include #include #include @@ -769,7 +770,7 @@ psycho_alloc_chipset(struct psycho_pbm *pp, int node, pci_chipset_tag_t pc) static struct extent * psycho_alloc_extent(struct psycho_pbm *pp, int node, int ss, const char *name) { - struct psycho_registers *pa = kmem_zalloc(sizeof *pa, KM_SLEEP); + struct psycho_registers *pa = NULL; struct psycho_ranges *pr; struct extent *ex; bus_addr_t baddr, addr; @@ -833,7 +834,7 @@ psycho_alloc_extent(struct psycho_pbm *pp, int node, int ss, const char *name) ret: /* return extent */ - kmem_free(pa, sizeof(*pa)); + free(pa, M_DEVBUF); return ex; }