函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\apic\x2apic_uv_x.c Create Date:2022-07-27 09:33:45
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:build_socket_tables

函数原型:static void __init build_socket_tables(void)

返回类型:void

参数:

1368  gre等于uv_gre_table
1371  minsock等于_min_socket
1372  maxsock等于_max_socket
1373  minpnode等于_min_pnode
1374  maxpnode等于_max_pnode
1377  如果非gre
1379  打印信息("UV: No UVsystab socket table, ignoring\n")
1380  返回
1382  打印错误信息("UV: Error: UVsystab address translations not available!\n")
1383  BUG()
1387  num等于maxsockminsock加1
1388  bytes等于num_socket_to_node[0]的长度
1389  _socket_to_node等于开辟内存
1390  _socket_to_pnode等于开辟内存
1392  nump等于maxpnodeminpnode加1
1393  bytes等于nump_pnode_to_socket[0]的长度
1394  _pnode_to_socket等于开辟内存
1395  BUG_ON(!_socket_to_node || !_socket_to_pnode || !_pnode_to_socket)
1397 i小于num循环_socket_to_node[i]等于_socket_to_pnode[i]等于SOCK_EMPTY
1400 i小于nump循环_pnode_to_socket[i]等于SOCK_EMPTY
1404  打印信息("UV: GAM Building socket/pnode conversion tables\n")
1405  Entry type: GAM_RANGE_TYPE_UNUSED, etc. 不等于End of table 循环
1406  如果 Entry type: GAM_RANGE_TYPE_UNUSED, etc. 恒等于Unused address range 则继续下一循环
1408  i等于 Socket ID, high bits of APIC ID minsock
1410  如果_socket_to_pnode[i]不等于SOCK_EMPTY则继续下一循环
1412  _socket_to_pnode[i]等于 Index to MMR and GRU spaces
1414  i等于 Index to MMR and GRU spaces minpnode
1415  _pnode_to_socket[i]等于 Socket ID, high bits of APIC ID
1417  打印信息("UV: sid:%02x type:%d nasid:%04x pn:%02x pn2s:%2x\n", Socket ID, high bits of APIC ID , Entry type: GAM_RANGE_TYPE_UNUSED, etc. , HNasid , _socket_to_pnode[ Socket ID, high bits of APIC ID - minsock], _pnode_to_socket[ Index to MMR and GRU spaces - minpnode])
1424  lnid等于NUMA_NO_NODE
1425  遍历现有CPU(cpu)
1426  nid等于cpu_to_node(cpu)
1429  如果lnid恒等于nid则继续下一循环
1431  lnid等于nid
1432  apicid等于per_cpu(Map cpu index to physical APIC ID, cpu)
1433  sockid等于apicid右移aka pnode_shift for UV1/2/3
1434  _socket_to_node[sockid - minsock]等于nid
1435  打印信息("UV: sid:%02x: apicid:%04x node:%2d\n", sockid, apicid, nid)
1440  bytes等于num_possible_nodes()乘The following values are used for the per node hub info struct [0]的长度
1441  The following values are used for the per node hub info struct 等于开辟内存
1442  BUG_ON(!The following values are used for the per node hub info struct )
1444 lnid小于num_possible_nodes()循环
1447 sockid小于等于maxsock循环
1448  如果lnid恒等于_socket_to_node[sockid - minsock]则
1453  如果sockid大于maxsock
1454  打印错误信息("UV: socket for node %d not found!\n", lnid)
1455  BUG()
1463  打印信息("UV: Checking socket->node/pnode for identity maps\n")
1464  如果minsock恒等于0则
1465 i小于num循环如果_socket_to_node[i]恒等于SOCK_EMPTYi不等于_socket_to_node[i]则
1467  退出
1468  如果i大于等于num
1469  释放内存
1470  _socket_to_node = NULL
1471  打印信息("UV: 1:1 socket_to_node table removed\n")
1474  如果minsock恒等于minpnode
1475 i小于num循环如果_socket_to_pnode[i]不等于SOCK_EMPTY_socket_to_pnode[i]不等于iminpnode
1478  退出
1479  如果i大于等于num
1480  释放内存
1481  _socket_to_pnode = NULL
1482  打印信息("UV: 1:1 socket_to_pnode table removed\n")
调用者
名称描述
uv_system_init_hub