Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\genalloc.c Create Date:2022-07-28 06:56:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:gen_pool_virt_to_phys - return the physical address of memory*@pool: pool to allocate from*@addr: starting address of memory* Returns the physical address on success, or -1 on error.

Proto:phys_addr_t gen_pool_virt_to_phys(struct gen_pool *pool, unsigned long addr)

Type:phys_addr_t

Parameter:

TypeParameterName
struct gen_pool *pool
unsigned longaddr
218  paddr = -1
220  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
222  If addr >= start address of memory chunk && addr <= d address of memory chunk (inclusive) Then
223  paddr = physical starting address of memory chunk + addr - start address of memory chunk
224  Break
227  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
229  Return paddr
Caller
NameDescribe
gen_pool_dma_alloc_algogen_pool_dma_alloc_algo - allocate special memory from the pool for DMA* usage with the given pool algorithm*@pool: pool to allocate from*@size: number of bytes to allocate from the pool*@dma: DMA-view physical address return value