Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\resource.c Create Date:2022-07-28 09:05:06
Last Modify:2022-05-22 11:14:39 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:This function calls the @func callback against all memory ranges of type* System RAM which are marked as IORESOURCE_SYSTEM_RAM and IORESOUCE_BUSY

Proto:int walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages, void *arg, int (*func)(unsigned long , unsigned long , void *))

Type:int

Parameter:

TypeParameterName
unsigned longstart_pfn
unsigned longnr_pages
void *arg
int (*func
482  ret = -EINVAL
484  start = start_pfn << PAGE_SHIFT determines the page size
485  end = ( start_pfn + nr_pages << PAGE_SHIFT determines the page size ) - 1
486  flags = I/O resource extended types | Driver has marked this resource busy
487  When start < end && Not Finds the lowest iomem resource that covers part of [@start..@end]. The* caller must specify @start, @end, @flags, and @desc (which may be* IORES_DESC_NONE).* If a resource is found, returns 0 and @*res is overwritten with the part cycle
490  pfn = PFN_UP(start)
491  end_pfn = PFN_DOWN(end + 1)
492  If end_pfn > pfn Then ret = ( * func)(pfn, end_pfn - pfn, arg)
494  If ret Then Break
496  start = end + 1
498  Return ret
Caller
NameDescribe
page_is_ramThis generic page_is_ram() returns true if specified address is* registered as System RAM in iomem_resource list.