Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305480
b: refs/heads/master
c: f7219a5
h: refs/heads/master
v: v3
  • Loading branch information
Alessandro Rubini authored and H. Peter Anvin committed Apr 12, 2012
1 parent 24a1e86 commit b00d718
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4692d77fc3c8978a36406a3cf9e8b899f86f68f1
refs/heads/master: f7219a5300ba753b0c762d631763bd878b8bb00c
3 changes: 3 additions & 0 deletions trunk/arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2220,6 +2220,9 @@ config X86_DEV_DMA_OPS
bool
depends on X86_64

config X86_DMA_REMAP
bool

source "net/Kconfig"

source "drivers/Kconfig"
Expand Down
7 changes: 7 additions & 0 deletions trunk/arch/x86/include/asm/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ extern void *dma_generic_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_addr, gfp_t flag,
struct dma_attrs *attrs);

#ifdef CONFIG_X86_DMA_REMAP /* Platform code defines bridge-specific code */
extern bool dma_capable(struct device *dev, dma_addr_t addr, size_t size);
extern dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr);
extern phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr);
#else

static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
{
if (!dev->dma_mask)
Expand All @@ -79,6 +85,7 @@ static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr)
{
return daddr;
}
#endif /* CONFIG_X86_DMA_REMAP */

static inline void
dma_cache_sync(struct device *dev, void *vaddr, size_t size,
Expand Down

0 comments on commit b00d718

Please sign in to comment.