Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/linux/dmapool.h
Show All 40 Lines | struct dma_pool *linux_dma_pool_create(char *name, struct device *dev, | ||||
size_t size, size_t align, size_t boundary); | size_t size, size_t align, size_t boundary); | ||||
void linux_dma_pool_destroy(struct dma_pool *pool); | void linux_dma_pool_destroy(struct dma_pool *pool); | ||||
void *linux_dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags, | void *linux_dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags, | ||||
dma_addr_t *handle); | dma_addr_t *handle); | ||||
void linux_dma_pool_free(struct dma_pool *pool, void *vaddr, | void linux_dma_pool_free(struct dma_pool *pool, void *vaddr, | ||||
dma_addr_t dma_addr); | dma_addr_t dma_addr); | ||||
struct dma_pool { | struct dma_pool { | ||||
struct pci_dev *pool_pdev; | struct device *pool_device; | ||||
uma_zone_t pool_zone; | uma_zone_t pool_zone; | ||||
struct mtx pool_dma_lock; | struct mtx pool_lock; | ||||
bus_dma_tag_t pool_dmat; | bus_dma_tag_t pool_dmat; | ||||
size_t pool_entry_size; | size_t pool_entry_size; | ||||
struct mtx pool_ptree_lock; | |||||
struct pctrie pool_ptree; | struct pctrie pool_ptree; | ||||
}; | }; | ||||
#define DMA_POOL_LOCK(pool) mtx_lock(&(pool)->pool_lock) | |||||
#define DMA_POOL_UNLOCK(pool) mtx_unlock(&(pool)->pool_lock) | |||||
static inline struct dma_pool * | static inline struct dma_pool * | ||||
dma_pool_create(char *name, struct device *dev, size_t size, | dma_pool_create(char *name, struct device *dev, size_t size, | ||||
size_t align, size_t boundary) | size_t align, size_t boundary) | ||||
{ | { | ||||
return (linux_dma_pool_create(name, dev, size, align, boundary)); | return (linux_dma_pool_create(name, dev, size, align, boundary)); | ||||
} | } | ||||
Show All 31 Lines |