git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
include
/
asm-x86_64
/
dma-mapping.h
diff --git
a/include/asm-x86_64/dma-mapping.h
b/include/asm-x86_64/dma-mapping.h
index
b6da83d
..
d6b8c72
100644
(file)
--- a/
include/asm-x86_64/dma-mapping.h
+++ b/
include/asm-x86_64/dma-mapping.h
@@
-55,13
+55,7
@@
extern dma_addr_t bad_dma_address;
extern struct dma_mapping_ops* dma_ops;
extern int iommu_merge;
extern struct dma_mapping_ops* dma_ops;
extern int iommu_merge;
-static inline int valid_dma_direction(int dma_direction)
-{
- return ((dma_direction == DMA_BIDIRECTIONAL) ||
- (dma_direction == DMA_TO_DEVICE) ||
- (dma_direction == DMA_FROM_DEVICE));
-}
-
+#ifndef CONFIG_XEN
static inline int dma_mapping_error(dma_addr_t dma_addr)
{
if (dma_ops->mapping_error)
static inline int dma_mapping_error(dma_addr_t dma_addr)
{
if (dma_ops->mapping_error)
@@
-70,6
+64,9
@@
static inline int dma_mapping_error(dma_addr_t dma_addr)
return (dma_addr == bad_dma_address);
}
return (dma_addr == bad_dma_address);
}
+#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
+#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
+
extern void *dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t gfp);
extern void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
extern void *dma_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t gfp);
extern void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
@@
-187,17
+184,22
@@
static inline int dma_get_cache_alignment(void)
return boot_cpu_data.x86_clflush_size;
}
return boot_cpu_data.x86_clflush_size;
}
-#define dma_is_consistent(h) 1
+#define dma_is_consistent(
d,
h) 1
extern int dma_set_mask(struct device *dev, u64 mask);
static inline void
extern int dma_set_mask(struct device *dev, u64 mask);
static inline void
-dma_cache_sync(void *vaddr, size_t size, enum dma_data_direction dir)
+dma_cache_sync(struct device *dev, void *vaddr, size_t size,
+ enum dma_data_direction dir)
{
flush_write_buffers();
}
extern struct device fallback_dev;
{
flush_write_buffers();
}
extern struct device fallback_dev;
+#else
+#include <asm-i386/mach-xen/asm/dma-mapping.h>
+#endif /* CONFIG_XEN */
+
extern int panic_on_overflow;
#endif /* _X8664_DMA_MAPPING_H */
extern int panic_on_overflow;
#endif /* _X8664_DMA_MAPPING_H */