-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x86: implement dma_map_single through dma_ops
That's already the name of the game for x86_64. For i386, we add a pci-base_32.c, that will hold the default operations. The function call itself goes through dma-mapping.h , the common header Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
- Loading branch information
Glauber Costa
authored and
Ingo Molnar
committed
Apr 19, 2008
1 parent
6f53663
commit 22456b9
Showing
5 changed files
with
31 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <linux/mm.h> | ||
#include <linux/kernel.h> | ||
#include <linux/module.h> | ||
#include <linux/dma-mapping.h> | ||
#include <asm/dma-mapping.h> | ||
|
||
static dma_addr_t pci32_map_single(struct device *dev, void *ptr, | ||
size_t size, int direction) | ||
{ | ||
WARN_ON(size == 0); | ||
flush_write_buffers(); | ||
return virt_to_phys(ptr); | ||
} | ||
|
||
static const struct dma_mapping_ops pci32_dma_ops = { | ||
.map_single = pci32_map_single, | ||
}; | ||
|
||
const struct dma_mapping_ops *dma_ops = &pci32_dma_ops; | ||
EXPORT_SYMBOL(dma_ops); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters