dma-mapping_32.h 869 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef _ASM_I386_DMA_MAPPING_H
  2. #define _ASM_I386_DMA_MAPPING_H
  3. #include <linux/mm.h>
  4. #include <linux/scatterlist.h>
  5. #include <asm/cache.h>
  6. #include <asm/io.h>
  7. #include <asm/bug.h>
  8. static inline int
  9. dma_mapping_error(dma_addr_t dma_addr)
  10. {
  11. return 0;
  12. }
  13. extern int forbid_dac;
  14. static inline int
  15. dma_get_cache_alignment(void)
  16. {
  17. /* no easy way to get cache size on all x86, so return the
  18. * maximum possible, to be safe */
  19. return (1 << INTERNODE_CACHE_SHIFT);
  20. }
  21. #define dma_is_consistent(d, h) (1)
  22. #define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
  23. extern int
  24. dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
  25. dma_addr_t device_addr, size_t size, int flags);
  26. extern void
  27. dma_release_declared_memory(struct device *dev);
  28. extern void *
  29. dma_mark_declared_memory_occupied(struct device *dev,
  30. dma_addr_t device_addr, size_t size);
  31. #endif