summaryrefslogtreecommitdiffstats
path: root/include/asm-x86/dma-mapping.h
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-03-25 18:36:37 -0300
committerIngo Molnar <mingo@elte.hu>2008-04-19 19:19:57 +0200
commitc786df08f6df2833e34e78cee5ef62558e3b5346 (patch)
treea699d91f610f9e33092c59589afc7c1bc6e65ee8 /include/asm-x86/dma-mapping.h
parent7c18341665917b493fa40eeb3c7ff6c1a5ac47db (diff)
x86: unify dma_mapping_error
We provide a map_error function in pci-base_32.c to make sure i386 keeps with the same behaviour it used to. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/dma-mapping.h')
-rw-r--r--include/asm-x86/dma-mapping.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asm-x86/dma-mapping.h b/include/asm-x86/dma-mapping.h
index 984935d86bb..a7090bbb2a2 100644
--- a/include/asm-x86/dma-mapping.h
+++ b/include/asm-x86/dma-mapping.h
@@ -54,6 +54,14 @@ struct dma_mapping_ops {
extern const struct dma_mapping_ops *dma_ops;
+static inline int dma_mapping_error(dma_addr_t dma_addr)
+{
+ if (dma_ops->mapping_error)
+ return dma_ops->mapping_error(dma_addr);
+
+ 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)