From owner-freebsd-current@FreeBSD.ORG Thu Jul 12 16:38:00 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 27062106566C; Thu, 12 Jul 2012 16:38:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id F236E8FC0A; Thu, 12 Jul 2012 16:37:59 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 91ACC46B0A; Thu, 12 Jul 2012 12:37:59 -0400 (EDT) Date: Thu, 12 Jul 2012 17:37:59 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ian Lepore In-Reply-To: <1342105327.1123.66.camel@revolution.hippie.lan> Message-ID: References: <201207121040.27116.jhb@freebsd.org> <1342105327.1123.66.camel@revolution.hippie.lan> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Peter Jeremy , scottl@freebsd.org, current@freebsd.org Subject: Re: Adding support for WC (write-combining) memory to bus_dma X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 16:38:00 -0000 On Thu, 12 Jul 2012, Ian Lepore wrote: > To be clear, I'm not objecting to your proposed changes, I'm more just > musing that similar problems exist in non-x86 architectures and maybe an MI > solution is possible (or at least the groundwork could be laid)? I was likewise going to comment that there are known defficiencies in handling page table attributes on non-x86 -- for example, they are ignored on MIPS. I encountered this when trying to add memory mapping support for a device driver and discovered that all entries were being installed cached instead of the requested uncached. I have local patches that propagate the same non-solution used by FreeBSD/MIPS within the kernel to the d_mmap interface -- namely, if you try to export something that isn't memory, then it knows it has to be uncached. I plan to commit these fixes to the MIPS TLB code pretty soon, but have been preoccupied with other things for the last few months. However, some heavier lifting is required to add attribute support, and it's quite desirable to do so. Robert