From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753334AbcAXUZv (ORCPT ); Sun, 24 Jan 2016 15:25:51 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:62159 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751968AbcAXUZt (ORCPT ); Sun, 24 Jan 2016 15:25:49 -0500 Date: Sun, 24 Jan 2016 20:26:15 +0000 From: "Maciej W. Rozycki" To: Brian Norris CC: =?ISO-8859-2?Q?Rafa=B3_Mi=B3ecki?= , Ralf Baechle , Javier Martinez Canillas , Linux Kernel Mailing List , Fengguang Wu , Michael Ellerman , Luis de Bethencourt , Jeremy Kerr , Neelesh Gupta , "linux-mtd@lists.infradead.org" , David Woodhouse , Cyril Bur , "Maciej W. Rozycki" Subject: Re: [PATCH] mtd: bcm47xxsflash: use devm_ioremap_nocache() instead of KSEG0ADDR() In-Reply-To: <20160123214918.GC24744@localhost> Message-ID: References: <1444813494-14985-1-git-send-email-javier@osg.samsung.com> <20151104185341.GN7274@google.com> <20160107230513.GL109450@google.com> <20160108185120.GQ109450@google.com> <20160123214918.GC24744@localhost> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [10.100.200.15] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 23 Jan 2016, Brian Norris wrote: > IIUC, this could be solved by: > (a) using an uncached mapping or > (b) explicitly invalidating the relevant region after doing flash writes > or erasures Flash writes are usually much, much less frequent than reads, so optimising for reads is IMO the right direction. So a cached mapping is a good choice, however invalidation must then be done after a write. > But I wonder why you haven't seen any problems if you've been using > KSEG0 (cached) this whole time. Maybe just luck? Or you don't actually > write to the flash that much? That depends on cache usage, any stale lines may well have usually gone in the course of regular cache line replacement, making the issue remain unnoticed. Maciej