函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\dmapool.c Create Date:2022-07-27 16:54:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t dma)

返回类型:void

参数:

类型参数名称
struct dma_pool *pool
void *vaddr
dma_addr_tdma
416  spin_lock_irqsave( & lock, flags)
417  page等于pool_find_page(pool, dma)
418  如果非page
419  spin_unlock_irqrestore( & lock, flags)
420  如果devdev_err(dev, "dma_pool_free %s, %p/%lx (bad dma)\n", name, vaddr, (unsignedlong)dma)
424  否则打印错误信息("dma_pool_free %s, %p/%lx (bad dma)\n", name, vaddr, (unsignedlong)dma)
427  返回
430  offset等于vaddrvaddr
431  如果want_init_on_free()则memset(vaddr, 0, size)
465  in_use自减
466  vaddr等于offset
467  offset等于offset
473  spin_unlock_irqrestore( & lock, flags)