[PATCH][CFI] Wrong cache invalidation bug fix

Nicolas Pitre nico at cam.org
Mon Dec 3 12:12:37 EST 2007


On Mon, 3 Dec 2007, massimo cirillo wrote:

> Hi,
> 
> We encountered the problem with cache invalidation in CFI driver. It
> causes corruptions of data read from flash.
> 
> The problem is investigated. The original code performs cache
> invalidation from "adr" to "adr + len" in do_write_buffer(). Since len
> and adr could be updated in the code before invalidation - it causes
> improper setting of cache invalidation regions.
> The following patch fixes this problem. This patch has been verified
> on our OMAP based platform.
> Could you please acknowledge and commit this patch?
> 
> Thanks a lot.
> 
> Signed-off-by Massimo Cirillo <maxcir at gmail.com> and Giuseppe D'Eliseo
> <giuseppedeliseo at gmail.com>

This patch is correct.  However, to make it more obvious, please change 
the used variable in the XIP_INVAL_CACHED_RANGE() call used in the same 
function as well.

With that change you can add "Acked-by: Nicolas Pitre <nico at cam.org>".


Nicolas



More information about the linux-mtd mailing list