Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto: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)

Type:int

Parameter:

TypeParameterName
resource_size_tstart
resource_size_tend
unsigned longflags
unsigned longdesc
boolfirst_lvl
struct resource *res
345  bool siblings_only = true
348  If Not res Then Return -EINVAL
351  If start >= end Then Return -EINVAL
354  read_lock( & resource_lock)
356  When p cycle
358  If start > end Then
359  p = NULL
360  Break
364  If end < start Then Continue
372  siblings_only = first_lvl
374  If (flags & flags) != flags Then Continue
376  If desc != IORES_DESC_NONE && desc != desc Then Continue
380  Break
383  If p Then
385  start = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(start, start)
386  end = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(end, end)
387  flags = flags
388  desc = desc
391  read_unlock( & resource_lock)
392  Return If p Then 0 Else -ENODEV
Caller
NameDescribe
__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