PERFORCE change 33843 for review

Marcel Moolenaar marcel at FreeBSD.org
Sun Jun 29 10:21:47 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=33843

Change 33843 by marcel at marcel_nfs on 2003/06/29 10:20:52

	Fix the creation of a fake tag. Use of barriers is fundamental
	given the newbus semantics, so drivers cannot be assumed to
	not use barriers on fake tags. The barrier code does not handle
	NULL functions, so we better have the barrier function point
	to something or otherwise make sure we have a parent.
	We opted to set the barrier function to that of nexus.

Affected files ...

.. //depot/projects/uart/sparc64/sparc64/bus_machdep.c#2 edit

Differences ...

==== //depot/projects/uart/sparc64/sparc64/bus_machdep.c#2 (text+ko) ====

@@ -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 */
@@ -712,7 +715,6 @@
 /*
  * 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
@@ -722,15 +724,13 @@
 	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,


More information about the p4-projects mailing list