Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\dmapool.c Create Date:2022-07-28 15:24:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:dma_pool_alloc - get a block of consistent memory*@pool: dma pool that will produce the block*@mem_flags: GFP_* bitmask*@handle: pointer to dma address of block* Return: the kernel virtual address of a currently unused block,

Proto:void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle)

Type:void

Parameter:

TypeParameterName
struct dma_pool *pool
gfp_tmem_flags
dma_addr_t *handle
327  might_sleep_if(gfpflags_allow_blocking(mem_flags))
329  spin_lock_irqsave( & lock, flags)
331  If offset < allocation Then Go to ready
336  spin_unlock_irqrestore( & lock, flags)
338  page = pool_alloc_page(pool, mem_flags & (~__GFP_ZERO))
339  If Not page Then Return NULL
342  spin_lock_irqsave( & lock, flags)
344  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
345  ready :
346  in_use++
347  offset = offset
348  offset = *(vaddr + offset)
349  retval = offset + vaddr
350  handle = offset + dma
379  spin_unlock_irqrestore( & lock, flags)
381  If want_init_on_alloc(mem_flags) Then memset(retval, 0, size)
384  Return retval