dma-mapping.h (271127) | dma-mapping.h (282513) |
---|---|
1/*- 2 * Copyright (c) 2010 Isilon Systems, Inc. 3 * Copyright (c) 2010 iX Systems, Inc. 4 * Copyright (c) 2010 Panasas, Inc. 5 * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 125 unchanged lines hidden (view full) --- 134 mem = (void *)kmem_alloc_contig(kmem_arena, size, flag, 0, high, align, 135 0, VM_MEMATTR_DEFAULT); 136 if (mem) 137 *dma_handle = vtophys(mem); 138 else 139 *dma_handle = 0; 140 return (mem); 141} | 1/*- 2 * Copyright (c) 2010 Isilon Systems, Inc. 3 * Copyright (c) 2010 iX Systems, Inc. 4 * Copyright (c) 2010 Panasas, Inc. 5 * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 125 unchanged lines hidden (view full) --- 134 mem = (void *)kmem_alloc_contig(kmem_arena, size, flag, 0, high, align, 135 0, VM_MEMATTR_DEFAULT); 136 if (mem) 137 *dma_handle = vtophys(mem); 138 else 139 *dma_handle = 0; 140 return (mem); 141} |
142 143static inline void * 144dma_zalloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, 145 gfp_t flag) 146{ 147 148 return (dma_alloc_coherent(dev, size, dma_handle, flag | __GFP_ZERO)); 149} |
|
142 143static inline void 144dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, 145 dma_addr_t dma_handle) 146{ 147 148 kmem_free(kmem_arena, (vm_offset_t)cpu_addr, size); 149} --- 122 unchanged lines hidden --- | 150 151static inline void 152dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, 153 dma_addr_t dma_handle) 154{ 155 156 kmem_free(kmem_arena, (vm_offset_t)cpu_addr, size); 157} --- 122 unchanged lines hidden --- |