Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:void dma_pool_destroy(struct dma_pool *pool)

Type:void

Parameter:

TypeParameterName
struct dma_pool *pool
271  bool empty = false
273  If Value for the false possibility is greater at compile time(!pool) Then Return
276  mutex_lock( & pools_reg_lock)
277  mutex_lock( & pools_lock)
278  deletes entry from list
279  If dev && list_empty - tests whether a list is empty*@head: the list to test. Then 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  If empty Then device_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  When Not list_empty - tests whether a list is empty*@head: the list to test. cycle
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.(next, structdma_page, page_list)
290  If is_page_busy(page) Then
291  If dev Then dev_err(dev, "dma_pool_destroy %s, %p busy\n", name, vaddr)
295  Else pr_err("dma_pool_destroy %s, %p busy\n", name, vaddr)
300  kfree(page)
301  Else pool_free_page(pool, page)
305  kfree(pool)
Caller
NameDescribe
dmam_pool_releaseManaged DMA pool