From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2473FDDFAF for ; Tue, 16 Dec 2008 19:59:09 +1100 (EST) Subject: Re: [PATCH] POWERPC: MTD: Add cached map support to physmap_of MTD driver From: Benjamin Herrenschmidt To: Trent Piepho In-Reply-To: References: <1229365518-20538-1-git-send-email-tpiepho@freescale.com> <18758.62580.416920.482077@cargo.ozlabs.ibm.com> Content-Type: text/plain Date: Tue, 16 Dec 2008 19:56:56 +1100 Message-Id: <1229417816.7319.4.camel@pasglop> Mime-Version: 1.0 Cc: linuxppc-dev@ozlabs.org, Paul Mackerras , xyzzy@speakeasy.org, MTD mailing list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 2008-12-15 at 17:11 -0800, Trent Piepho wrote: > Shame, as it provides a huge speed up. I suppose an alternative would be > to map the chip twice at different physical addresses, by just configuring > the chip select to be twice the size it should be, and giving them > different cacheability. Nice trick. That would probably work. > Or changing the mapping for writes and then changing it back. It wouldn't > be necessary to change the whole thing, just the page being written to. Right though changing mappings can be expensive. It might be worth looking at using fixmap for that tho, which is the fastest way to setup and tear down mappings, especially since we can (though we don't today) implement a bypass on those to directly load the TLB. Cheers, Ben.