函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:dma_pool_destroy - destroys a pool of dma memory blocks.*@pool: dma pool that will be destroyed* Context: !in_interrupt()* Caller guarantees that no more memory from the pool is in use,* and that nothing will try to use the pool after this call.

函数原型:void dma_pool_destroy(struct dma_pool *pool)

返回类型:void

参数:

类型参数名称
struct dma_pool *pool
271  bool empty = false
273  如果此条件成立可能性小(为编译器优化)(!pool)则返回
276  mutex_lock( & pools_reg_lock)
277  mutex_lock( & pools_lock)
278  删除链表项
279  如果dev链表为空empty = true
281  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
282  如果emptydevice_remove_file(dev, & dev_attr_pools)
284  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
286  当非链表为空循环
288  page等于list_entry - get the struct for this entry*@ptr: the &struct list_head pointer.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.(链表后项, structdma_page, page_list)
290  如果is_page_busy(page)则
291  如果devdev_err(dev, "dma_pool_destroy %s, %p busy\n", name, vaddr)
295  否则打印错误信息("dma_pool_destroy %s, %p busy\n", name, vaddr)
300  释放内存
301  否则pool_free_page(pool, page)
305  释放内存
调用者
名称描述
dmam_pool_releaseManaged DMA pool