All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about cacheline aligned memory for DMA transfers
@ 2015-05-06 11:39 Johannes Thoma
  2015-05-07  7:09 ` Clemens Ladisch
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Thoma @ 2015-05-06 11:39 UTC (permalink / raw)
  To: linux-kernel

Dear list,

I am working on a memory corruption problem with a patched 2.6.21 kernel in the
USB driver. In order to better understand the problem I would like to ask how
current kernels handle the case where the same cacheline is used for a DMA-able
object and another object.

Does kmalloc return only memory that is cache line aligned? If not, do all
architectures handle cache line misalign
ed dma accesses correctly like the powerpc (although not yet in 2.6.21)
architecture does?

Thanks for any insights.

- Johannes

PS: Please CC me I am not on the list.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question about cacheline aligned memory for DMA transfers
  2015-05-06 11:39 Question about cacheline aligned memory for DMA transfers Johannes Thoma
@ 2015-05-07  7:09 ` Clemens Ladisch
  0 siblings, 0 replies; 2+ messages in thread
From: Clemens Ladisch @ 2015-05-07  7:09 UTC (permalink / raw)
  To: Johannes Thoma, linux-kernel

Johannes Thoma wrote:
> Does kmalloc return only memory that is cache line aligned?

Yes.

> do all architectures handle cache line misalign ed dma accesses
> correctly?

x86 does.  Most other architectures do not have DMA-coherent caches.


Regards,
Clemens

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-07  7:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-06 11:39 Question about cacheline aligned memory for DMA transfers Johannes Thoma
2015-05-07  7:09 ` Clemens Ladisch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.