dma-mapping.c (14451467014b4c8aff6570b44b6d0ee68cd49bc0) | dma-mapping.c (249baa54790171438524ba97e8e0485dd6aa2762) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * linux/arch/arm/mm/dma-mapping.c 4 * 5 * Copyright (C) 2000-2004 Russell King 6 * 7 * DMA uncached mapping support. 8 */ 9#include <linux/module.h> 10#include <linux/mm.h> 11#include <linux/genalloc.h> 12#include <linux/gfp.h> 13#include <linux/errno.h> 14#include <linux/list.h> 15#include <linux/init.h> 16#include <linux/device.h> | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * linux/arch/arm/mm/dma-mapping.c 4 * 5 * Copyright (C) 2000-2004 Russell King 6 * 7 * DMA uncached mapping support. 8 */ 9#include <linux/module.h> 10#include <linux/mm.h> 11#include <linux/genalloc.h> 12#include <linux/gfp.h> 13#include <linux/errno.h> 14#include <linux/list.h> 15#include <linux/init.h> 16#include <linux/device.h> |
17#include <linux/dma-direct.h> |
|
17#include <linux/dma-mapping.h> 18#include <linux/dma-noncoherent.h> 19#include <linux/dma-contiguous.h> 20#include <linux/highmem.h> 21#include <linux/memblock.h> 22#include <linux/slab.h> 23#include <linux/iommu.h> 24#include <linux/io.h> --- 162 unchanged lines hidden (view full) --- 187 .map_sg = arm_dma_map_sg, 188 .unmap_sg = arm_dma_unmap_sg, 189 .map_resource = dma_direct_map_resource, 190 .sync_single_for_cpu = arm_dma_sync_single_for_cpu, 191 .sync_single_for_device = arm_dma_sync_single_for_device, 192 .sync_sg_for_cpu = arm_dma_sync_sg_for_cpu, 193 .sync_sg_for_device = arm_dma_sync_sg_for_device, 194 .dma_supported = arm_dma_supported, | 18#include <linux/dma-mapping.h> 19#include <linux/dma-noncoherent.h> 20#include <linux/dma-contiguous.h> 21#include <linux/highmem.h> 22#include <linux/memblock.h> 23#include <linux/slab.h> 24#include <linux/iommu.h> 25#include <linux/io.h> --- 162 unchanged lines hidden (view full) --- 188 .map_sg = arm_dma_map_sg, 189 .unmap_sg = arm_dma_unmap_sg, 190 .map_resource = dma_direct_map_resource, 191 .sync_single_for_cpu = arm_dma_sync_single_for_cpu, 192 .sync_single_for_device = arm_dma_sync_single_for_device, 193 .sync_sg_for_cpu = arm_dma_sync_sg_for_cpu, 194 .sync_sg_for_device = arm_dma_sync_sg_for_device, 195 .dma_supported = arm_dma_supported, |
196 .get_required_mask = dma_direct_get_required_mask, |
|
195}; 196EXPORT_SYMBOL(arm_dma_ops); 197 198static void *arm_coherent_dma_alloc(struct device *dev, size_t size, 199 dma_addr_t *handle, gfp_t gfp, unsigned long attrs); 200static void arm_coherent_dma_free(struct device *dev, size_t size, void *cpu_addr, 201 dma_addr_t handle, unsigned long attrs); 202static int arm_coherent_dma_mmap(struct device *dev, struct vm_area_struct *vma, --- 4 unchanged lines hidden (view full) --- 207 .alloc = arm_coherent_dma_alloc, 208 .free = arm_coherent_dma_free, 209 .mmap = arm_coherent_dma_mmap, 210 .get_sgtable = arm_dma_get_sgtable, 211 .map_page = arm_coherent_dma_map_page, 212 .map_sg = arm_dma_map_sg, 213 .map_resource = dma_direct_map_resource, 214 .dma_supported = arm_dma_supported, | 197}; 198EXPORT_SYMBOL(arm_dma_ops); 199 200static void *arm_coherent_dma_alloc(struct device *dev, size_t size, 201 dma_addr_t *handle, gfp_t gfp, unsigned long attrs); 202static void arm_coherent_dma_free(struct device *dev, size_t size, void *cpu_addr, 203 dma_addr_t handle, unsigned long attrs); 204static int arm_coherent_dma_mmap(struct device *dev, struct vm_area_struct *vma, --- 4 unchanged lines hidden (view full) --- 209 .alloc = arm_coherent_dma_alloc, 210 .free = arm_coherent_dma_free, 211 .mmap = arm_coherent_dma_mmap, 212 .get_sgtable = arm_dma_get_sgtable, 213 .map_page = arm_coherent_dma_map_page, 214 .map_sg = arm_dma_map_sg, 215 .map_resource = dma_direct_map_resource, 216 .dma_supported = arm_dma_supported, |
217 .get_required_mask = dma_direct_get_required_mask, |
|
215}; 216EXPORT_SYMBOL(arm_coherent_dma_ops); 217 218static int __dma_supported(struct device *dev, u64 mask, bool warn) 219{ 220 unsigned long max_dma_pfn = min(max_pfn, arm_dma_pfn_limit); 221 222 /* --- 2185 unchanged lines hidden --- | 218}; 219EXPORT_SYMBOL(arm_coherent_dma_ops); 220 221static int __dma_supported(struct device *dev, u64 mask, bool warn) 222{ 223 unsigned long max_dma_pfn = min(max_pfn, arm_dma_pfn_limit); 224 225 /* --- 2185 unchanged lines hidden --- |