Module Name: src Committed By: palle Date: Wed Jan 6 20:04:30 UTC 2021
Modified Files: src/sys/arch/sparc64/dev: psycho.c Log Message: psycho: explicit allocation of memory using kmem(9) instead of using the buffer indirectly allocted in the prom_getprop() function (which is still using malloc(9) for memory allocation To generate a diff of this commit: cvs rdiff -u -r1.129 -r1.130 src/sys/arch/sparc64/dev/psycho.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/sparc64/dev/psycho.c diff -u src/sys/arch/sparc64/dev/psycho.c:1.129 src/sys/arch/sparc64/dev/psycho.c:1.130 --- src/sys/arch/sparc64/dev/psycho.c:1.129 Mon Jan 4 14:48:51 2021 +++ src/sys/arch/sparc64/dev/psycho.c Wed Jan 6 20:04:30 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: psycho.c,v 1.129 2021/01/04 14:48:51 thorpej Exp $ */ +/* $NetBSD: psycho.c,v 1.130 2021/01/06 20:04:30 palle Exp $ */ /* * Copyright (c) 1999, 2000 Matthew R. Green @@ -55,7 +55,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: psycho.c,v 1.129 2021/01/04 14:48:51 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: psycho.c,v 1.130 2021/01/06 20:04:30 palle Exp $"); #include "opt_ddb.h" @@ -769,7 +769,7 @@ psycho_alloc_chipset(struct psycho_pbm * static struct extent * psycho_alloc_extent(struct psycho_pbm *pp, int node, int ss, const char *name) { - struct psycho_registers *pa = NULL; + struct psycho_registers *pa = kmem_zalloc(sizeof *pa, KM_SLEEP); struct psycho_ranges *pr; struct extent *ex; bus_addr_t baddr, addr;