Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:dma_pool_free - put block back into dma pool*@pool: the dma pool holding the block*@vaddr: virtual address of block*@dma: dma address of block* Caller promises neither device nor driver will again touch this block* unless it is first re-allocated.

Proto:void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t dma)

Type:void

Parameter:

TypeParameterName
struct dma_pool *pool
void *vaddr
dma_addr_tdma
416  spin_lock_irqsave( & lock, flags)
417  page = pool_find_page(pool, dma)
418  If Not page Then
419  spin_unlock_irqrestore( & lock, flags)
420  If dev Then dev_err(dev, "dma_pool_free %s, %p/%lx (bad dma)\n", name, vaddr, (unsignedlong)dma)
424  Else pr_err("dma_pool_free %s, %p/%lx (bad dma)\n", name, vaddr, (unsignedlong)dma)
427  Return
430  offset = vaddr - vaddr
431  If want_init_on_free() Then memset(vaddr, 0, size)
465  in_use--
466  vaddr = offset
467  offset = offset
473  spin_unlock_irqrestore( & lock, flags)