Re: DMA problem with VIA EHCI controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27 sep 2009, at 03:34, Ming Lei wrote:
It is very odd, and how can you see the alignment of kmalloc is
violated if CONFIG_DEBUG_SLAB=y?

I added
  printk("%p\n", bulk_in_buffer);
and it printed ffff880011b7cdf0.
The size of the kmalloc was 512 bytes.

DMA transfer requires that the transfer buffer is cache aligned, or else
your problem is understandable.

Yeah I have read that before. I don't get why cache alignment matters though.

The buffer allocated by kmalloc should be cache aligned, and it is a
basic requirement for kmalloc in fact.

mm/slab.c:
* Usually, the kmalloc caches are cache_line_size() aligned, except when * DEBUG and FORCED_DEBUG are enabled, then they are BYTES_PER_WORD aligned.

Joris.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux