-
- bytes = num_nodes * sizeof(_node_to_pnode[0]);
- _node_to_pnode = kmalloc(bytes, GFP_KERNEL);
- BUG_ON(!_node_to_pnode);
-
- for (blade = 0, i = 0; i < UVH_NODE_PRESENT_TABLE_DEPTH; i++) {
- unsigned short pnode;
- unsigned long present =
- uv_read_local_mmr(UVH_NODE_PRESENT_TABLE + i * 8);
-
- for (j = 0; j < 64; j++) {
- if (!test_bit(j, &present))
- continue;
- pnode = (i * 64 + j) & hub_info->pnode_mask;
- _node_to_pnode[blade++] = pnode;
- }
- if (blade > num_nodes) {
- pr_err("UV: blade count(%d) exceeds node count(%d)!\n",
- blade, num_nodes);
- BUG();
- }
- }