diff --git a/sys/powerpc/include/bus.h b/sys/powerpc/include/bus.h --- a/sys/powerpc/include/bus.h +++ b/sys/powerpc/include/bus.h @@ -103,7 +103,7 @@ /* mapping/unmapping */ int (*bs_map)(bus_addr_t, bus_size_t, int, bus_space_handle_t *); - void (*bs_unmap)(bus_size_t); + void (*bs_unmap)(bus_space_handle_t, bus_size_t); int (*bs_subregion)(bus_space_handle_t, bus_size_t, bus_size_t, bus_space_handle_t *); diff --git a/sys/powerpc/powerpc/bus_machdep.c b/sys/powerpc/powerpc/bus_machdep.c --- a/sys/powerpc/powerpc/bus_machdep.c +++ b/sys/powerpc/powerpc/bus_machdep.c @@ -140,8 +140,13 @@ } static void -bs_gen_unmap(bus_size_t size __unused) +bs_gen_unmap(bus_space_handle_t bsh, bus_size_t size) { + + if (!pmap_bootstrapped) + return; + + pmap_unmapdev((void *)bsh, size); } static int