On Thu, 2009-12-10 at 23:48 +0300, Ilya Loginov wrote: > On Thu, 10 Dec 2009 14:28:04 -0600 > James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> wrote: > > > Which exact driver in drivers/mtd? I can probably just look at it and > > see where the kmap/flush is supposed to be. > > So, do you think that problem is only in slram driver not in mtd layer > in the large? Yes, you can't copy into a kernel mapping of a user page without flushing and expect it to succeed in an aliased environment. This is the source of your incoherency. The slram driver is doing a memcpy between the kernel address it's given and the allocated ram area in slram_read and slram_write. To fix mips, you just need a flush_kernel_dcache_page() in slram_read so that the alias is updated after the memcpy. I would also expect this driver not to work on any highmem system without additional kmap/kunmap(_atomic) pairs in the read and write routines. How many other mtd drivers are affected, I'm not sure ... any that do PIO are wrong ... those that do MMIO should be right (that looks to be just the omap driver). James -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html