From owner-svn-src-stable@FreeBSD.ORG Sat May 14 21:07:53 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1912C106566B; Sat, 14 May 2011 21:07:53 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1AB38FC08; Sat, 14 May 2011 21:07:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4EL7qBx015843; Sat, 14 May 2011 21:07:52 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4EL7qed015841; Sat, 14 May 2011 21:07:52 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201105142107.p4EL7qed015841@svn.freebsd.org> From: Marius Strobl Date: Sat, 14 May 2011 21:07:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221920 - stable/7/sys/sparc64/pci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 May 2011 21:07:53 -0000 Author: marius Date: Sat May 14 21:07:52 2011 New Revision: 221920 URL: http://svn.freebsd.org/changeset/base/221920 Log: MFC: r219785 - Make a panic message better reflect the actual problem. - A closer inspection of the OpenSolaris code indicates the block store workaround is only necessary in case of BUS_DMASYNC_POSTREAD. - Mark some unused parameters as such. Modified: stable/7/sys/sparc64/pci/fire.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/sparc64/pci/fire.c ============================================================================== --- stable/7/sys/sparc64/pci/fire.c Sat May 14 21:07:51 2011 (r221919) +++ stable/7/sys/sparc64/pci/fire.c Sat May 14 21:07:52 2011 (r221920) @@ -336,7 +336,7 @@ fire_attach(device_t dev) if (OF_getprop(node, "portid", &sc->sc_ign, sizeof(sc->sc_ign)) == -1) panic("%s: could not determine IGN", __func__); if (OF_getprop(node, "module-revision#", &prop, sizeof(prop)) == -1) - panic("%s: could not determine revision", __func__); + panic("%s: could not determine module-revision", __func__); device_printf(dev, "%s, module-revision %d, IGN %#x\n", desc->fd_name, prop, sc->sc_ign); @@ -1509,18 +1509,20 @@ fire_dmamap_sync(bus_dma_tag_t dt __unus static u_char buf[VIS_BLOCKSIZE] __aligned(VIS_BLOCKSIZE); register_t reg, s; - if ((map->dm_flags & DMF_LOADED) == 0 || - (op & ~BUS_DMASYNC_POSTWRITE) == 0) + if ((map->dm_flags & DMF_LOADED) == 0) return; - s = intr_disable(); - reg = rd(fprs); - wr(fprs, reg | FPRS_FEF, 0); - __asm __volatile("stda %%f0, [%0] %1" - : : "r" (buf), "n" (ASI_BLK_COMMIT_S)); - membar(Sync); - wr(fprs, reg, 0); - intr_restore(s); + if ((op & BUS_DMASYNC_POSTREAD) != 0) { + s = intr_disable(); + reg = rd(fprs); + wr(fprs, reg | FPRS_FEF, 0); + __asm __volatile("stda %%f0, [%0] %1" + : : "r" (buf), "n" (ASI_BLK_COMMIT_S)); + membar(Sync); + wr(fprs, reg, 0); + intr_restore(s); + } else if ((op & BUS_DMASYNC_PREWRITE) != 0) + membar(Sync); } static void @@ -2127,7 +2129,7 @@ fire_release_resource(device_t bus, devi } static bus_dma_tag_t -fire_get_dma_tag(device_t bus, device_t child) +fire_get_dma_tag(device_t bus, device_t child __unused) { struct fire_softc *sc; @@ -2136,7 +2138,7 @@ fire_get_dma_tag(device_t bus, device_t } static phandle_t -fire_get_node(device_t bus, device_t dev) +fire_get_node(device_t bus, device_t child __unused) { struct fire_softc *sc;