From 47e55d105ee95be0323ef02a52d7b6263d3fcb63 Mon Sep 17 00:00:00 2001 From: andvar Date: Sat, 9 Sep 2023 20:47:29 +0000 Subject: [PATCH] relocate DPRINTF below to make sure that bpa is initialized. fixes BUS_SPACE_DEBUG enabled build for hpcmips. --- sys/arch/hpcmips/hpcmips/bus_space.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/arch/hpcmips/hpcmips/bus_space.c b/sys/arch/hpcmips/hpcmips/bus_space.c index a5d8da634aca..56f43870f52a 100644 --- a/sys/arch/hpcmips/hpcmips/bus_space.c +++ b/sys/arch/hpcmips/hpcmips/bus_space.c @@ -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 -__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 #include @@ -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) {