scatterlist.h 942 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef _ASM_SCATTERLIST_H
  2. #define _ASM_SCATTERLIST_H
  3. /*
  4. * Drivers must set either ->address or (preferred) ->page and ->offset
  5. * to indicate where data must be transferred to/from.
  6. *
  7. * Using ->page is recommended since it handles highmem data as well as
  8. * low mem. ->address is restricted to data which has a virtual mapping, and
  9. * it will go away in the future. Updating to ->page can be automated very
  10. * easily -- something like
  11. *
  12. * sg->address = some_ptr;
  13. *
  14. * can be rewritten as
  15. *
  16. * sg->page = virt_to_page(some_ptr);
  17. * sg->offset = (unsigned long) some_ptr & ~PAGE_MASK;
  18. *
  19. * and that's it. There's no excuse for not highmem enabling YOUR driver. /jens
  20. */
  21. struct scatterlist {
  22. struct page *page; /* Location for highmem page, if any */
  23. unsigned int offset; /* for highmem, page offset */
  24. dma_addr_t dma_address;
  25. unsigned int length;
  26. };
  27. #define ISA_DMA_THRESHOLD (0xffffffffUL)
  28. #endif /* !_ASM_SCATTERLIST_H */