mapping.c (03ab8e6297acd1bc0eedaa050e2a1635c576fd11) | mapping.c (a229cc14f3395311b899e5e582b71efa8dd01df0) |
---|---|
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 */ --- 759 unchanged lines hidden (view full) --- 768 size = dma_direct_max_mapping_size(dev); 769 else if (ops && ops->max_mapping_size) 770 size = ops->max_mapping_size(dev); 771 772 return size; 773} 774EXPORT_SYMBOL_GPL(dma_max_mapping_size); 775 | 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 */ --- 759 unchanged lines hidden (view full) --- 768 size = dma_direct_max_mapping_size(dev); 769 else if (ops && ops->max_mapping_size) 770 size = ops->max_mapping_size(dev); 771 772 return size; 773} 774EXPORT_SYMBOL_GPL(dma_max_mapping_size); 775 |
776size_t dma_opt_mapping_size(struct device *dev) 777{ 778 const struct dma_map_ops *ops = get_dma_ops(dev); 779 size_t size = SIZE_MAX; 780 781 if (ops && ops->opt_mapping_size) 782 size = ops->opt_mapping_size(); 783 784 return min(dma_max_mapping_size(dev), size); 785} 786EXPORT_SYMBOL_GPL(dma_opt_mapping_size); 787 |
|
776bool dma_need_sync(struct device *dev, dma_addr_t dma_addr) 777{ 778 const struct dma_map_ops *ops = get_dma_ops(dev); 779 780 if (dma_map_direct(dev, ops)) 781 return dma_direct_need_sync(dev, dma_addr); 782 return ops->sync_single_for_cpu || ops->sync_single_for_device; 783} --- 12 unchanged lines hidden --- | 788bool dma_need_sync(struct device *dev, dma_addr_t dma_addr) 789{ 790 const struct dma_map_ops *ops = get_dma_ops(dev); 791 792 if (dma_map_direct(dev, ops)) 793 return dma_direct_need_sync(dev, dma_addr); 794 return ops->sync_single_for_cpu || ops->sync_single_for_device; 795} --- 12 unchanged lines hidden --- |