Return error code to indicate no support. Signed-off-by: Will Davis <wdavis@xxxxxxxxxx> --- arch/x86/kernel/amd_gart_64.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/x86/kernel/amd_gart_64.c b/arch/x86/kernel/amd_gart_64.c index 8e3842f..6ba62e6 100644 --- a/arch/x86/kernel/amd_gart_64.c +++ b/arch/x86/kernel/amd_gart_64.c @@ -474,6 +474,19 @@ error: return 0; } +#ifdef CONFIG_HAS_DMA_P2P +static dma_peer_addr_t gart_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 bad_dma_addr; +} +#endif + /* allocate and map a coherent mapping */ static void * gart_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_addr, @@ -704,6 +717,9 @@ static struct dma_map_ops gart_dma_ops = { .alloc = gart_alloc_coherent, .free = gart_free_coherent, .mapping_error = gart_mapping_error, +#ifdef CONFIG_HAS_DMA_P2P + .map_peer_resource = gart_map_peer_resource, +#endif }; static void gart_iommu_shutdown(void) -- 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