Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Check if the requested addr and size spans more than any slot in the* iomem resource tree.

Proto:int iomem_map_sanity_check(resource_size_t addr, unsigned long size)

Type:int

Parameter:

TypeParameterName
resource_size_taddr
unsigned longsize
1534  p = iomem_resource
1535  err = 0
1538  read_lock( & resource_lock)
1539  When p cycle
1544  If start >= addr + size Then Continue
1546  If end < addr Then Continue
1548  If PFN_DOWN(start) <= PFN_DOWN(addr) && PFN_DOWN(end) >= PFN_DOWN(addr + size - 1) Then Continue
1557  If flags & Driver has marked this resource busy Then Continue
1560  printk(warning conditions "resource sanity check: requesting [mem %#010llx-%#010llx], which spans more than %s %pR\n", (unsignedlonglong)addr, (unsignedlonglong)(addr + size - 1), name, p)
1564  err = -1
1565  Break
1567  read_unlock( & resource_lock)
1569  Return err