mapping.c (7c2645a2a30a45d3dc4c98b315a51be44ec69a67) | mapping.c (159bf19270e80b5bc4b13aa88072dcb390b4d297) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * arch-independent dma-mapping routines 4 * 5 * Copyright (c) 2006 SUSE Linux Products GmbH 6 * Copyright (c) 2006 Tejun Heo <teheo@suse.de> 7 */ 8#include <linux/memblock.h> /* for max_pfn */ --- 709 unchanged lines hidden (view full) --- 718 if (!ops) 719 return dma_direct_supported(dev, mask); 720 if (!ops->dma_supported) 721 return 1; 722 return ops->dma_supported(dev, mask); 723} 724EXPORT_SYMBOL(dma_supported); 725 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * arch-independent dma-mapping routines 4 * 5 * Copyright (c) 2006 SUSE Linux Products GmbH 6 * Copyright (c) 2006 Tejun Heo <teheo@suse.de> 7 */ 8#include <linux/memblock.h> /* for max_pfn */ --- 709 unchanged lines hidden (view full) --- 718 if (!ops) 719 return dma_direct_supported(dev, mask); 720 if (!ops->dma_supported) 721 return 1; 722 return ops->dma_supported(dev, mask); 723} 724EXPORT_SYMBOL(dma_supported); 725 |
726bool dma_pci_p2pdma_supported(struct device *dev) 727{ 728 const struct dma_map_ops *ops = get_dma_ops(dev); 729 730 /* if ops is not set, dma direct will be used which supports P2PDMA */ 731 if (!ops) 732 return true; 733 734 /* 735 * Note: dma_ops_bypass is not checked here because P2PDMA should 736 * not be used with dma mapping ops that do not have support even 737 * if the specific device is bypassing them. 738 */ 739 740 return ops->flags & DMA_F_PCI_P2PDMA_SUPPORTED; 741} 742EXPORT_SYMBOL_GPL(dma_pci_p2pdma_supported); 743 |
|
726#ifdef CONFIG_ARCH_HAS_DMA_SET_MASK 727void arch_dma_set_mask(struct device *dev, u64 mask); 728#else 729#define arch_dma_set_mask(dev, mask) do { } while (0) 730#endif 731 732int dma_set_mask(struct device *dev, u64 mask) 733{ --- 77 unchanged lines hidden --- | 744#ifdef CONFIG_ARCH_HAS_DMA_SET_MASK 745void arch_dma_set_mask(struct device *dev, u64 mask); 746#else 747#define arch_dma_set_mask(dev, mask) do { } while (0) 748#endif 749 750int dma_set_mask(struct device *dev, u64 mask) 751{ --- 77 unchanged lines hidden --- |