Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__request_region - create a new busy resource region*@parent: parent resource descriptor*@start: resource start address*@n: resource region size*@name: reserving caller's ID string*@flags: IO resource flags

Proto:struct resource *__request_region(struct resource *parent, resource_size_t start, resource_size_t n, const char *name, int flags)

Type:struct resource

Parameter:

TypeParameterName
struct resource *parent
resource_size_tstart
resource_size_tn
const char *name
intflags
1127  DECLARE_WAITQUEUE(wait, current process)
1128  res = alloc_resource(GFP_KERNEL)
1130  If Not res Then Return NULL
1133  name = name
1134  start = start
1135  end = start + n - 1
1137  write_lock( & resource_lock)
1139  cycle
1142  flags = resource_type(parent) | resource_ext_type(parent)
1143  flags |= Driver has marked this resource busy | flags
1144  desc = desc
1146  conflict = Return the conflict entry if you can't request it
1147  If Not conflict Then Break
1155  pr_warn("Unaddressable device %s %pR conflicts with %pR", name, conflict, res)
1158  If conflict != parent Then
1160  parent = conflict
1161  Continue
1168  schedule()
1171  Continue
1174  free_resource(res)
1175  res = NULL
1176  Break
1178  write_unlock( & resource_lock)
1179  Return res
Caller
NameDescribe
__devm_request_region