From owner-p4-projects@FreeBSD.ORG Sun Jun 29 10:21:46 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 56B0737B404; Sun, 29 Jun 2003 10:21:46 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 05E0E37B401 for ; Sun, 29 Jun 2003 10:21:46 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D50B43FE1 for ; Sun, 29 Jun 2003 10:21:45 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h5THLj0U096075 for ; Sun, 29 Jun 2003 10:21:45 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h5THLjcD096069 for perforce@freebsd.org; Sun, 29 Jun 2003 10:21:45 -0700 (PDT) Date: Sun, 29 Jun 2003 10:21:45 -0700 (PDT) Message-Id: <200306291721.h5THLjcD096069@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 33843 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2003 17:21:47 -0000 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 #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 */ @@ -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,