From owner-svn-src-all@FreeBSD.ORG Tue May 27 14:06:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59D111A8; Tue, 27 May 2014 14:06:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4711F2D60; Tue, 27 May 2014 14:06:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4RE6O8c028714; Tue, 27 May 2014 14:06:24 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4RE6OBw028713; Tue, 27 May 2014 14:06:24 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201405271406.s4RE6OBw028713@svn.freebsd.org> From: Scott Long Date: Tue, 27 May 2014 14:06:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r266745 - head/sys/x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2014 14:06:24 -0000 Author: scottl Date: Tue May 27 14:06:23 2014 New Revision: 266745 URL: http://svnweb.freebsd.org/changeset/base/266745 Log: Revert r266481. It was based on faulty analysis of the problem. A correct fix is forthcoming. Obtained from: Netflix, Inc. Modified: head/sys/x86/x86/busdma_bounce.c Modified: head/sys/x86/x86/busdma_bounce.c ============================================================================== --- head/sys/x86/x86/busdma_bounce.c Tue May 27 13:35:31 2014 (r266744) +++ head/sys/x86/x86/busdma_bounce.c Tue May 27 14:06:23 2014 (r266745) @@ -172,35 +172,12 @@ bounce_bus_dma_tag_create(bus_dma_tag_t newtag->map_count = 0; newtag->segments = NULL; - /* - * Bouncing might be needed if there's a filter. - * XXX Filters are likely broken as there's no way to - * guarantee that bounce pages will also satisfy the - * filter requirement. - */ if (parent != NULL && ((newtag->common.filter != NULL) || ((parent->common.flags & BUS_DMA_COULD_BOUNCE) != 0))) newtag->common.flags |= BUS_DMA_COULD_BOUNCE; - /* - * Bouncing might be needed if there's an upper memory - * restriction. - */ - if (newtag->common.lowaddr < ptoa((vm_paddr_t)Maxmem)) - newtag->common.flags |= BUS_DMA_COULD_BOUNCE; - - /* - * Bouncing might be needed if there's an alignment - * restriction that can't be satisfied by breaking up - * the segment. - * XXX Need to consider non-natural alignment. - * XXX Static allocations that tie to bus_dmamem_alloc() - * will likely pass this test and be penalized with - * the COULD_BOUNCE flag. Should probably have - * bus_dmamem_alloc() clear this flag. - */ - if ((newtag->common.nsegments <= 1) && - (newtag->common.alignment > 1)) + if (newtag->common.lowaddr < ptoa((vm_paddr_t)Maxmem) || + newtag->common.alignment > 1) newtag->common.flags |= BUS_DMA_COULD_BOUNCE; if (((newtag->common.flags & BUS_DMA_COULD_BOUNCE) != 0) &&