scatterlist.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:1k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. #ifndef _ASM_PARISC_SCATTERLIST_H
  2. #define _ASM_PARISC_SCATTERLIST_H
  3. #include <asm/page.h>
  4. struct scatterlist {
  5. /* This will disappear in 2.5.x */
  6. char *address;
  7. /* page/offset only valid if ADDRESS member is NULL.
  8. ** Needed to support CONFIG_HIGHMEM on x386.
  9. ** I still think davem is a dork for forcing other
  10. ** arches to add this to 2.4.x. -ggg
  11. */
  12. struct page *page;
  13. unsigned int offset;
  14. unsigned int length;
  15. /* an IOVA can be 64-bits on some PA-Risc platforms. */
  16. dma_addr_t iova; /* I/O Virtual Address */
  17. __u32      iova_length; /* bytes mapped */
  18. };
  19. #define sg_virt_addr(sg) (((sg)->address) ? ((sg)->address) : 
  20. ((sg)->page->virtual + (sg)->offset))
  21. #define sg_dma_address(sg) ((sg)->iova)
  22. #define sg_dma_len(sg)     ((sg)->iova_length)
  23. #define ISA_DMA_THRESHOLD (~0UL)
  24. #endif /* _ASM_PARISC_SCATTERLIST_H */