relocate DPRINTF below to make sure that bpa is initialized.

fixes BUS_SPACE_DEBUG enabled build for hpcmips.
This commit is contained in:
andvar 2023-09-09 20:47:29 +00:00
parent c8c055b33a
commit 47e55d105e
1 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: bus_space.c,v 1.32 2016/07/11 16:18:56 matt Exp $ */
/* $NetBSD: bus_space.c,v 1.33 2023/09/09 20:47:29 andvar Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.32 2016/07/11 16:18:56 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.33 2023/09/09 20:47:29 andvar Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -337,9 +337,6 @@ __bs_alloc(bus_space_tag_t tx, bus_addr_t rstart, bus_addr_t rend,
if (!t->extent)
panic("bus_space_alloc: no extent");
DPRINTF(("\tbus_space_alloc:%#lx(%#lx)+%#lx\n", bpa,
bpa - t->base, size));
rstart += t->base;
rend += t->base;
if ((err = extent_alloc_subregion(t->extent, rstart, rend, size,
@ -347,6 +344,9 @@ __bs_alloc(bus_space_tag_t tx, bus_addr_t rstart, bus_addr_t rend,
return (err);
}
DPRINTF(("\tbus_space_alloc:%#lx(%#lx)+%#lx\n", bpa,
bpa - t->base, size));
*bshp = __hpcmips_cacheable(t, bpa, size, cacheable);
if (bpap) {