Function report |
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 activity | Download SCCT | Chinese |
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 |
| 1378 | If WARNING: UVx_HUB_IS_SUPPORTED defines are deprecated and will be removed || is_uv2_hub() || is_uv3_hub() 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() |
| 1388 | bytes = num * size of _socket_to_node[0] |
| 1389 | _socket_to_node = Allocation memory |
| 1393 | bytes = nump * size of _pnode_to_socket[0] |
| 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 |
| 1414 | i = Index to MMR and GRU spaces - minpnode |
| 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) |
| 1433 | sockid = apicid >> aka pnode_shift for UV1/2/3 |
| 1434 | _socket_to_node[sockid - minsock] = nid |
| 1440 | bytes = num_possible_nodes() * size of The following values are used for the per node hub info struct [0] |
| 1444 | When lnid < num_possible_nodes() cycle |
| 1448 | If lnid == _socket_to_node[sockid - minsock] Then |
| 1449 | The following values are used for the per node hub info struct [lnid] = _socket_to_pnode[sockid - minsock] |
| 1450 | Break |
| 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 |
| 1470 | _socket_to_node = NULL |
| 1471 | pr_info("UV: 1:1 socket_to_node table removed\n") |
| 1475 | When i < num cycle If _socket_to_pnode[i] != SOCK_EMPTY && _socket_to_pnode[i] != i + minpnode Then |
| 1478 | Break |
| 1481 | _socket_to_pnode = NULL |
| 1482 | pr_info("UV: 1:1 socket_to_pnode table removed\n") |
| Name | Describe |
|---|---|
| uv_system_init_hub |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |