Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\apic\x2apic_uv_x.c Create Date:2022-07-28 08:34:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:build_socket_tables

Proto:static void __init build_socket_tables(void)

Type:void

Parameter:Nothing

1368  gre = uv_gre_table
1371  minsock = _min_socket
1372  maxsock = _max_socket
1373  minpnode = _min_pnode
1374  maxpnode = _max_pnode
1377  If Not gre Then
1379  pr_info("UV: No UVsystab socket table, ignoring\n")
1380  Return
1382  pr_crit("UV: Error: UVsystab address translations not available!\n")
1383  BUG()
1387  num = maxsock - minsock + 1
1388  bytes = num * size of _socket_to_node[0]
1389  _socket_to_node = Allocation memory
1390  _socket_to_pnode = Allocation memory
1392  nump = maxpnode - minpnode + 1
1393  bytes = nump * size of _pnode_to_socket[0]
1394  _pnode_to_socket = Allocation memory
1395  BUG_ON(!_socket_to_node || !_socket_to_pnode || !_pnode_to_socket)
1397  When i < num cycle _socket_to_node[i] = _socket_to_pnode[i] = SOCK_EMPTY
1400  When i < nump cycle _pnode_to_socket[i] = SOCK_EMPTY
1404  pr_info("UV: GAM Building socket/pnode conversion tables\n")
1405  When Entry type: GAM_RANGE_TYPE_UNUSED, etc. != End of table cycle
1406  If Entry type: GAM_RANGE_TYPE_UNUSED, etc. == Unused address range Then Continue
1408  i = Socket ID, high bits of APIC ID - minsock
1410  If _socket_to_pnode[i] != SOCK_EMPTY Then Continue
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  pr_info("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  for_each_present_cpu(cpu)
1426  nid = cpu_to_node(cpu)
1429  If lnid == nid Then Continue
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  pr_info("UV: sid:%02x: apicid:%04x node:%2d\n", sockid, apicid, nid)
1440  bytes = num_possible_nodes() * size of 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 = Allocation memory
1442  BUG_ON(!The following values are used for the per node hub info struct )
1444  When lnid < num_possible_nodes() cycle
1447  When sockid <= maxsock cycle
1448  If lnid == _socket_to_node[sockid - minsock] Then
1453  If sockid > maxsock Then
1454  pr_err("UV: socket for node %d not found!\n", lnid)
1455  BUG()
1463  pr_info("UV: Checking socket->node/pnode for identity maps\n")
1464  If minsock == 0 Then
1465  When i < num cycle If _socket_to_node[i] == SOCK_EMPTY || i != _socket_to_node[i] Then
1467  Break
1468  If i >= num Then
1470  _socket_to_node = NULL
1471  pr_info("UV: 1:1 socket_to_node table removed\n")
1474  If minsock == minpnode Then
1475  When i < num cycle If _socket_to_pnode[i] != SOCK_EMPTY && _socket_to_pnode[i] != i + minpnode Then
1478  Break
1479  If i >= num Then
1481  _socket_to_pnode = NULL
1482  pr_info("UV: 1:1 socket_to_pnode table removed\n")
Caller
NameDescribe
uv_system_init_hub