函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\resource.c Create Date:2022-07-27 10:04:48
Last Modify:2022-05-22 11:14:39 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

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

函数原型:static int find_next_iomem_res(resource_size_t start, resource_size_t end, unsigned long flags, unsigned long desc, bool first_lvl, struct resource *res)

返回类型:int

参数:

类型参数名称
resource_size_tstart
resource_size_tend
unsigned longflags
unsigned longdesc
boolfirst_lvl
struct resource *res
345  bool siblings_only = true
348  如果非res则返回:负EINVAL
351  如果start大于等于end则返回:负EINVAL
354  read_lock( & resource_lock)
356 p循环
358  如果start大于end
359  p = NULL
360  退出
364  如果end小于start则继续下一循环
372  siblings_only等于first_lvl
374  如果flags按位与flags的值不等于flags则继续下一循环
376  如果desc不等于IORES_DESC_NONEdesc不等于desc则继续下一循环
380  退出
383  如果p
385  start等于两数取大(start, start)
386  end等于两数取小(end, end)
387  flags等于flags
388  desc等于desc
391  read_unlock( & resource_lock)
392  返回:如果p则0否则负ENODEV
调用者
名称描述
__walk_iomem_res_desc
walk_system_ram_rangeThis function calls the @func callback against all memory ranges of type* System RAM which are marked as IORESOURCE_SYSTEM_RAM and IORESOUCE_BUSY