UBI on SPI NOR flash
Artem Bityutskiy
dedekind1 at gmail.com
Mon Sep 3 05:23:42 EDT 2012
On Mon, 2012-08-27 at 18:15 +0200, Jan Lübbe wrote:
> > Another problem I know with SPI flashes is that UBIFS uses vmalloc'd
> > memory for I/O, which is not suitable for DMA-ing on ARM platforms
> and
> > may cause subtle bugs and curruptions. Can you try to disable DMA
> and
> > see if the issues go away?
>
> It works if I disable DMA in drivers/spi/spi-omap2-mcspi.c (simply
> comment out the DMA branch in omap2_mcspi_work). I can use UBI&UBIFS
> without problems for far. When rebooting to a kernel with DMA enabled
> I
> can no longer attach the previously working volume. Moving back to the
> PIO-Kernel, it works again.
>
> Where should this be fixed? Should UBI use kmalloc'ed memory?
Yes, the best way to fix this is to teach UBI and UBIFS stop using
vmalloc(). It is not straight-forward, but doable. As I said several
times, I can assist by giving ideas and directions, but someone who
needs this should probably allocate a couple of men-months for this
project.
> Why does this work for NAND controllers using DMA? :)
I am not sure, you should investigate. I think some drivers just check
if this is vmalloced memory, and avoid DMA for that. Some (e.g.,
onenand) use various hacks which appear to work.
--
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120903/ebcfc109/attachment.sig>
More information about the linux-mtd
mailing list