Re: [PATCH 1/2] USB: Allow HCDs to specifiy their DMA alignment requirements

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

 



Ming Lei wrote:
> 
> Suppose hcd->driver->dma_align_shift is zero and HC is byte aligned DMA
> enabled, this means DMA is doable between byte aligned memory and HC,
> but this does __not__ mean it is safe to do dma mapping or unmapping between
> CPU and byte aligned memory, which may cause sync issues between memory
> and CPU cache.

kmalloc() already ensures that the memory it allocates is suitably
aligned and sized to be safe for DMA.  Therefore, any DMA transfers
to/from a subsection of a kmalloc()'d buffer are also safe.

David
-- 
David Vrabel, Senior Software Engineer, Drivers
CSR, Churchill House, Cambridge Business Park,  Tel: +44 (0)1223 692562
Cowley Road, Cambridge, CB4 0WZ                 http://www.csr.com/


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
--
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