On-line:
Linux slab 分配器剖析 http://www.ibm.com/developerworks/linux/library/l-linux-slab-allocator/
了解 Linux 虚拟内存管理器 http://www.phptr.com/content/images/0131453483/downloads/gorman_book.pdf
Linux 设备驱动程序,第三版 http://lwn.net/Kernel/LDD3/
Linux 内核模块编程指南 http://tldp.org/LDP/lkmpg/2.6/html/
在 Linux 中编写设备驱动程序:简要教程 http://www.freesoftwaremagazine.com/node/1238/
Books:
Linux 内核开发(第二版) https://rads.stackoverflow.com/amzn/click/com/0672327201
基本 Linux 设备驱动程序 https://rads.stackoverflow.com/amzn/click/com/0132396556(仅限前4-5章)
有用的资源:
Linux 交叉参考 http://lxr.linux.no/+trees(所有内核的可搜索内核源)
2.6内核系列中的API变化 http://lwn.net/Articles/2.6-kernel-api/
dma_sync_single_for_device http://lxr.linux.no/#linux+v2.6.33/arch/arm/include/asm/dma-mapping.h#L425 calls dma_sync_single_range_for_cpu
在文件中再往上一点,这是源文档(我假设即使这是针对arm的,接口和行为是相同的):
/**
380 * dma_sync_single_range_for_cpu
381 * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
382 * @handle: DMA address of buffer
383 * @offset: offset of region to start sync
384 * @size: size of region to sync
385 * @dir: DMA transfer direction (same as passed to dma_map_single)
386 *
387 * Make physical memory consistent for a single streaming mode DMA
388 * translation after a transfer.
389 *
390 * If you perform a dma_map_single() but wish to interrogate the
391 * buffer using the cpu, yet do not wish to teardown the PCI dma
392 * mapping, you must call this function before doing so. At the
393 * next point you give the PCI dma address back to the card, you
394 * must first the perform a dma_sync_for_device, and then the
395 * device again owns the buffer.
396 */