summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-08-24 07:47:52 +0000
committermarcel <marcel@FreeBSD.org>2003-08-24 07:47:52 +0000
commit059f203fe6d68672d637b3daa5302ecf8e3b304a (patch)
tree6cde2191a0db10c0c3dbbdb624df1c18dda3a7bc
parent83aa2d3a0b86119a65cff58bd55817dbee03b9d7 (diff)
downloadFreeBSD-src-059f203fe6d68672d637b3daa5302ecf8e3b304a.zip
FreeBSD-src-059f203fe6d68672d637b3daa5302ecf8e3b304a.tar.gz
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.
-rw-r--r--sys/sparc64/sparc64/bus_machdep.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/sparc64/sparc64/bus_machdep.c b/sys/sparc64/sparc64/bus_machdep.c
index e0655e2..59d413a 100644
--- a/sys/sparc64/sparc64/bus_machdep.c
+++ b/sys/sparc64/sparc64/bus_machdep.c
@@ -135,6 +135,9 @@
#include <machine/smp.h>
#include <machine/tlb.h>
+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,
OpenPOWER on IntegriCloud