Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jun 2003 10:21:45 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 33843 for review
Message-ID:  <200306291721.h5THLjcD096069@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=33843

Change 33843 by marcel@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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200306291721.h5THLjcD096069>