From owner-freebsd-mips@FreeBSD.ORG Tue Aug 28 14:31:27 2012 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA758106566B; Tue, 28 Aug 2012 14:31:27 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id 571348FC12; Tue, 28 Aug 2012 14:31:23 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id q7SEVMEj006002; Tue, 28 Aug 2012 08:31:22 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q7SEVJ5w033171; Tue, 28 Aug 2012 08:31:19 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: Warner Losh In-Reply-To: References: <1345757300.27688.535.camel@revolution.hippie.lan> <3A08EB08-2BBF-4B0F-97F2-A3264754C4B7@bsdimp.com> <1345763393.27688.578.camel@revolution.hippie.lan> <1345765503.27688.602.camel@revolution.hippie.lan> <1345766109.27688.606.camel@revolution.hippie.lan> <1346002922.1140.56.camel@revolution.hippie.lan> <1346005507.1140.69.camel@revolution.hippie.lan> <10307B47-13F3-45C0-87F7-66FD3ACA3F86@bsdimp.com> <1346081557.1140.181.camel@revolution.hippie.lan> Content-Type: text/plain; charset="us-ascii" Date: Tue, 28 Aug 2012 08:31:19 -0600 Message-ID: <1346164279.1140.328.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org, Hans Petter Selasky , Mark Tinguely , freebsd-mips@freebsd.org, freebsd-arch@freebsd.org Subject: Re: Partial cacheline flush problems on ARM and MIPS X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 14:31:28 -0000 On Mon, 2012-08-27 at 09:57 -0600, Warner Losh wrote: > >> I don't think the cache line problem can be solved with bounce > buffers. Trying to accommodate broken drivers is what lead us to this > spot. We need to fix the broken drivers. If that's impossible, then > the best we can do is have the driver set a 'always bounce' flag in > the tag it creates and use that to always bounce for operations > through that tag. > > > > So you'd be okay with a driver setting a flag that says "always > bounce" > > but not okay with the busdma layer bouncing only when it's actually > > necessary? I'm confused -- do you think the busdma layer will be > unable > > to detect when it's necessary unless directed from the outside? > > Actually, it is good you are confused. I was wrong when I said I'd be > happy with a flag that says always bounce. The reason is that the > driver can do this all the time for those cases like the at91 mci > driver does. After studying the busdma implementation code and pondering this some more, I now understand why the automatic bouncing that I think is the ideal solution to this is so hard to accomplish. I'm not sure "Impossible" is the right description, but I'm afraid that in the long run "impractical" might turn out to be the case. I'm going to think all this over for a few days, maybe do a bit of actual paying work, before revisiting it. -- Ian