Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161780
b: refs/heads/master
c: 4a9a6bf
h: refs/heads/master
v: v3
  • Loading branch information
FUJITA Tomonori authored and Benjamin Herrenschmidt committed Aug 28, 2009
1 parent f4d4d50 commit e292a02
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 46bab4e4b45ec522ecd5fa4a0e2b4a6e6d1f153a
refs/heads/master: 4a9a6bfe707cfe5bcb0a20eabe240293a095cd10
5 changes: 5 additions & 0 deletions trunk/arch/powerpc/include/asm/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ static inline void dma_free_coherent(struct device *dev, size_t size,

static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
{
struct dma_map_ops *dma_ops = get_dma_ops(dev);

if (dma_ops->mapping_error)
return dma_ops->mapping_error(dev, dma_addr);

#ifdef CONFIG_PPC64
return (dma_addr == DMA_ERROR_CODE);
#else
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/powerpc/kernel/dma-swiotlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ struct dma_map_ops swiotlb_dma_ops = {
.sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu,
.sync_single_range_for_device = swiotlb_sync_single_range_for_device,
.sync_sg_for_cpu = swiotlb_sync_sg_for_cpu,
.sync_sg_for_device = swiotlb_sync_sg_for_device
.sync_sg_for_device = swiotlb_sync_sg_for_device,
.mapping_error = swiotlb_dma_mapping_error,
};

void pci_dma_dev_setup_swiotlb(struct pci_dev *pdev)
Expand Down

0 comments on commit e292a02

Please sign in to comment.