[PATCH 19/22] x86: Calgary: Add map_peer_resource stub

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Return DMA_ERROR_CODE to indicate no support.

Signed-off-by: Will Davis <wdavis@xxxxxxxxxx>
---
 arch/x86/kernel/pci-calgary_64.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
index 0497f71..ec3d998 100644
--- a/arch/x86/kernel/pci-calgary_64.c
+++ b/arch/x86/kernel/pci-calgary_64.c
@@ -431,6 +431,19 @@ static void calgary_unmap_page(struct device *dev, dma_addr_t dma_addr,
 	iommu_free(tbl, dma_addr, npages);
 }
 
+#ifdef CONFIG_HAS_DMA_P2P
+static dma_peer_addr_t calgary_map_peer_resource(struct device *dev,
+						 struct device *peer,
+						 struct resource *res,
+						 unsigned long offset,
+						 size_t size,
+						 enum dma_data_direction dir,
+						 struct dma_attrs *attrs)
+{
+	return DMA_ERROR_CODE;
+}
+#endif
+
 static void* calgary_alloc_coherent(struct device *dev, size_t size,
 	dma_addr_t *dma_handle, gfp_t flag, struct dma_attrs *attrs)
 {
@@ -485,6 +498,9 @@ static struct dma_map_ops calgary_dma_ops = {
 	.unmap_sg = calgary_unmap_sg,
 	.map_page = calgary_map_page,
 	.unmap_page = calgary_unmap_page,
+#ifdef CONFIG_HAS_DMA_P2P
+	.map_peer_resource = calgary_map_peer_resource,
+#endif
 };
 
 static inline void __iomem * busno_to_bbar(unsigned char num)
-- 
2.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux