cregit-Linux how code gets into the kernel

Release 4.17 include/linux/dmapool.h

Directory: include/linux
/*
 * include/linux/dmapool.h
 *
 * Allocation pools for DMAable (coherent) memory.
 *
 * This file is licensed under  the terms of the GNU General Public 
 * License version 2. This program is licensed "as is" without any 
 * warranty of any kind, whether express or implied.
 */

#ifndef LINUX_DMAPOOL_H

#define	LINUX_DMAPOOL_H

#include <linux/scatterlist.h>
#include <asm/io.h>

struct device;

#ifdef CONFIG_HAS_DMA

struct dma_pool *dma_pool_create(const char *name, struct device *dev, 
			size_t size, size_t align, size_t allocation);

void dma_pool_destroy(struct dma_pool *pool);

void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags,
		     dma_addr_t *handle);
void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr);

/*
 * Managed DMA pool
 */
struct dma_pool *dmam_pool_create(const char *name, struct device *dev,
				  size_t size, size_t align, size_t allocation);
void dmam_pool_destroy(struct dma_pool *pool);

#else /* !CONFIG_HAS_DMA */

static inline struct dma_pool *dma_pool_create(const char *name, struct device *dev, size_t size, size_t align, size_t allocation) { return NULL; }

Contributors

PersonTokensPropCommitsCommitProp
Geert Uytterhoeven31100.00%1100.00%
Total31100.00%1100.00%


static inline void dma_pool_destroy(struct dma_pool *pool) { }

Contributors

PersonTokensPropCommitsCommitProp
Geert Uytterhoeven763.64%150.00%
Sean O. Stalley436.36%150.00%
Total11100.00%2100.00%


static inline void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle) { return NULL; }

Contributors

PersonTokensPropCommitsCommitProp
Sean O. Stalley1773.91%150.00%
Geert Uytterhoeven626.09%150.00%
Total23100.00%2100.00%


static inline void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr) { }

Contributors

PersonTokensPropCommitsCommitProp
Deepak Saxena1583.33%150.00%
Geert Uytterhoeven316.67%150.00%
Total18100.00%2100.00%


static inline struct dma_pool *dmam_pool_create(const char *name, struct device *dev, size_t size, size_t align, size_t allocation) { return NULL; }

Contributors

PersonTokensPropCommitsCommitProp
Tejun Heo2477.42%150.00%
Geert Uytterhoeven722.58%150.00%
Total31100.00%2100.00%


static inline void dmam_pool_destroy(struct dma_pool *pool) { }

Contributors

PersonTokensPropCommitsCommitProp
Tejun Heo872.73%150.00%
Geert Uytterhoeven327.27%150.00%
Total11100.00%2100.00%

#endif /* !CONFIG_HAS_DMA */
static inline void *dma_pool_zalloc(struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle) { return dma_pool_alloc(pool, mem_flags | __GFP_ZERO, handle); }

Contributors

PersonTokensPropCommitsCommitProp
Geert Uytterhoeven32100.00%1100.00%
Total32100.00%1100.00%

#endif

Overall Contributors

PersonTokensPropCommitsCommitProp
Geert Uytterhoeven14952.10%114.29%
Deepak Saxena7827.27%114.29%
Tejun Heo3211.19%114.29%
Sean O. Stalley217.34%114.29%
Mark Brown31.05%114.29%
Christoph Hellwig20.70%114.29%
Al Viro10.35%114.29%
Total286100.00%7100.00%
Directory: include/linux
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.