From owner-svn-src-all@FreeBSD.ORG Thu Aug 23 16:00:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BB14D1065670; Thu, 23 Aug 2012 16:00:04 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by mx1.freebsd.org (Postfix) with ESMTP id 788878FC08; Thu, 23 Aug 2012 16:00:04 +0000 (UTC) Received: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id C95294C03BA; Thu, 23 Aug 2012 11:00:03 -0500 (CDT) Received: from mh11.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh11.mail.rice.edu (Postfix) with ESMTP id C7B1A4C03A0; Thu, 23 Aug 2012 11:00:03 -0500 (CDT) X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from mh11.mail.rice.edu ([127.0.0.1]) by mh11.mail.rice.edu (mh11.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id Eq9XAP9KyIBE; Thu, 23 Aug 2012 11:00:03 -0500 (CDT) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id 916FB4C0372; Thu, 23 Aug 2012 11:00:01 -0500 (CDT) Message-ID: <5036537F.2060801@rice.edu> Date: Thu, 23 Aug 2012 10:59:59 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:8.0) Gecko/20111113 Thunderbird/8.0 MIME-Version: 1.0 To: John Baldwin References: <201208222248.q7MMmojL011382@svn.freebsd.org> <201208230746.57495.jhb@freebsd.org> In-Reply-To: <201208230746.57495.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Oleksandr Tymoshenko , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r239597 - head/sys/arm/arm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 23 Aug 2012 16:00:05 -0000 On 08/23/2012 06:46, John Baldwin wrote: > On Wednesday, August 22, 2012 6:48:50 pm Oleksandr Tymoshenko wrote: >> Author: gonzo >> Date: Wed Aug 22 22:48:50 2012 >> New Revision: 239597 >> URL: http://svn.freebsd.org/changeset/base/239597 >> >> Log: >> Do not change "cachable" attribute for DMA memory allocated with >> BUS_DMA_COHERENT attribute >> >> The minimum unit for changing "cachable" attribute is page, so call >> to pmap_change_attr effectively disable cache for all pages that newly >> allocated DMA memory region spans on. The problem is that general-purpose >> memory could reside on these pages too and disabling cache might affect >> performance. Moreover ldrex/strex operators raise Data Abort exception >> when accessing memory on page with "cachable" attribute off. >> >> BUS_DMA_COHERENT does nto require memory to be coherent. It just suggests >> to do best effort for reducing synchronization overhead. > Alternatively you could force an allocation with BUS_DMA_COHERENT to always > allocate at least one page. Also, it is probably better to match what I > recently did in x86 and use kmem_alloc_contig() or kmem_alloc_attr() for > allocations with a custom memory attribute rather than using > pmap_change_attr() directly. > The arm pmap doesn't have the necessary support for memory attributes. pmap_page_{get,set}_memattr() are just stubs. Alan