[PATCH] mtd: bcm47xxsflash: use devm_ioremap_nocache() instead of KSEG0ADDR()

Maciej W. Rozycki macro at imgtec.com
Sun Jan 24 12:26:15 PST 2016


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



More information about the linux-mtd mailing list