Re: [PATCH] jffs2 summary allocation



Hi,

I think the main problem is that mtd buffers are not dma compatible [1].
They can be allocated by vmalloc, don't be aligned on a page, ...

The problem was catch on jffs2 summary, but the same things could happen in other places.

So for me the correct fix, is either to fix mtd to have all buffer dma compatible or either fix mtd_dataflash to don't pass mtd buffer to spi stack, but to allocate dma buffer and do some copy.

BTW aren't there sparse annotation to track dma buffer ?

Matthieu

[1] http://article.gmane.org/gmane.linux.drivers.mtd/20663
As for the original question... I'm not sure. At the moment I don't
believe it's true that all such buffers are suitable for DMA. Perhaps it
would be sensible for us to redefine the MTD API so that it is required
(and fix the users).

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH] asm-generic: add dma-mapping-linear.h
    ... * performing DMA. ... * Free a DMA buffer previously allocated by ... +static inline dma_addr_t ...
    (Linux-Kernel)
  • Re: [PATCH 10/17] Blackfin: convert dma/pci to asm-generic
    ... * performing DMA. ... * Map a single buffer of the indicated size for DMA in streaming mode. ... static inline dma_addr_t ...
    (Linux-Kernel)
  • [PATCH] asm-generic: add dma-mapping-linear.h
    ... * performing DMA. ... * Free a DMA buffer previously allocated by ... +static inline dma_addr_t ...
    (Linux-Kernel)
  • Re: High-performance IO
    ... The size of contigious buffer is meaningfull for common buffer DMA ... I would say that for scatter-gather DMA it depends on how much memory ... I know that AWE can give the programmer a way to use ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Trying to DMA data from PCI bus to IDE
    ... and then use the regular Linux functions to write it to the ... > hdparm has nothing to do with the kernel's in memory caching of disk ... It's still creating a buffer stack somewhere (even ... DMA it directly to the drive by setting the IO ports and registers. ...
    (comp.os.linux.development.system)