From 3f51411974fcfd008ef3e07e894a8da9f8bdff4a Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sun, 24 Aug 2003 07:47:52 +0000 Subject: [PATCH] Allow bus barrier operations on fake tags. The purpose of a fake bus tag is to allow bus space accesses prior to having newbus fully initialized, such as would be the case for console drivers. Since barriers are a fundamental part of bus space accesses, not allowing them on fake tags would defeat the purpose of these tags. We use the barrier function normally associated with nexus. This is the barrier used when subordinates haven't defined a barrier themselves. --- sys/sparc64/sparc64/bus_machdep.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/sparc64/sparc64/bus_machdep.c b/sys/sparc64/sparc64/bus_machdep.c index e0655e2a970..59d413ae465 100644 --- a/sys/sparc64/sparc64/bus_machdep.c +++ b/sys/sparc64/sparc64/bus_machdep.c @@ -135,6 +135,9 @@ #include #include +static void nexus_bus_barrier(bus_space_tag_t, bus_space_handle_t, + bus_size_t, bus_size_t, int); + /* ASI's for bus access. */ int bus_type_asi[] = { ASI_PHYS_BYPASS_EC_WITH_EBIT, /* UPA */ @@ -767,7 +770,6 @@ sparc64_bus_mem_unmap(void *bh, bus_size_t size) /* * Fake up a bus tag, for use by console drivers in early boot when the regular * means to allocate resources are not yet available. - * Note that these tags are not eligible for bus_space_barrier operations. * Addr is the physical address of the desired start of the handle. */ bus_space_handle_t @@ -777,15 +779,13 @@ sparc64_fake_bustag(int space, bus_addr_t addr, struct bus_space_tag *ptag) ptag->bst_cookie = NULL; ptag->bst_parent = NULL; ptag->bst_type = space; - ptag->bst_bus_barrier = NULL; + ptag->bst_bus_barrier = nexus_bus_barrier; return (addr); } /* * Base bus space handlers. */ -static void nexus_bus_barrier(bus_space_tag_t, bus_space_handle_t, - bus_size_t, bus_size_t, int); static void nexus_bus_barrier(bus_space_tag_t t, bus_space_handle_t h, bus_size_t offset,