函数逻辑报告

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:55
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:uv_system_init_hub

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

返回类型:void

参数:

1555  struct uv_hub_info_s hub_info = {0}
1557  min_pnode等于9999, max_pnode等于0
1558  char * hub = is_uv4_hub() ? "UV400" : is_uv3_hub() ? "UV300" : is_uv2_hub() ? "UV2000/3000" : WARNING: UVx_HUB_IS_SUPPORTED defines are deprecated and will be removed ? "UV100/1000" : NULL
1563  如果非hub
1564  打印错误信息("UV: Unknown/unsupported UV hub\n")
1565  返回
1567  打印信息("UV: Found %s hub\n", hub)
1569  map_low_mmrs()
1572  uv_bios_init()
1575  如果decode_uv_systab()小于0则返回
1578  build_socket_tables()
1579  Build GAM range lookup table:
1580  set_block_size()
1581  uv_init_hub_info( & hub_info)
1582  uv_possible_blades等于num_possible_nodes()
1583  如果非The following values are used for the per node hub info struct Set up physical blade translations from UVH_NODE_PRESENT_TABLE* .. NB: UVH_NODE_PRESENT_TABLE is going away,* .. being replaced by GAM Range Table
1587  打印信息("UV: Found %d hubs, %d nodes, %d CPUs\n", uv_num_possible_blades(), num_possible_nodes(), num_possible_cpus())
1589  uv_bios_get_sn_info(0, & uv_type, & sn_partition_id, & sn_coherency_id, & sn_region_size, & system_serial_number)
1590  coherency_domain_number等于sn_coherency_id
1591  uv_rtc_init()
1593  bytes等于*的长度乘uv_num_possible_blades()
1594  __uv_hub_info_list等于分配内存并置零
1595  BUG_ON(!__uv_hub_info_list)
1597  bytes等于sizeof(structuv_hub_info_s)
1598  for_each_node(nodeid)
1601  如果__uv_hub_info_list[nodeid]则
1602  打印错误信息("UV: Node %d UV HUB already initialized!?\n", nodeid)
1603  BUG()
1607  new_hub等于如果nodeid恒等于0则uv_hub_info_node0否则根据内存节点分配内存
1608  BUG_ON(!new_hub)
1609  __uv_hub_info_list[nodeid]等于new_hub
1610  new_hub等于uv_hub_info_list(nodeid)
1611  BUG_ON(!new_hub)
1612  new_hub等于hub_info
1615  如果The following values are used for the per node hub info struct pnode等于The following values are used for the per node hub info struct [nodeid]
1617  否则pnode等于0xffff
1620  numa_blade_id等于Convert linux node number to the UV blade number.* .. Currently for UV1 thru UV4 the node and the blade are identical.* .. If this changes then you MUST check references to this function!
1621  memory_nid等于NUMA_NO_NODE
1622  nr_possible_cpus等于0
1623  nr_online_cpus等于0
1627  遍历可用CPU(cpu)
1628  apicid等于per_cpu(Map cpu index to physical APIC ID, cpu)
1632  nodeid等于cpu_to_node(cpu)
1633  numa_node_id等于numa_cpu_node(cpu)
1634  pnode等于Extract/Convert a PNODE from an APICID (full apicid, not processor subset)
1636  ( & ( * ({
1636  ({
1636  循环
1636  const void * __vpp_verify = NULL
1636  当0循环
1636  __uv_cpu_info的地址
1636  })
1636  })))->p_uv_hub_info = uv_hub_info_list(nodeid)
1637  ( & ( * ({
1637  ({
1637  循环
1637  const void * __vpp_verify = NULL
1637  当0循环
1637  __uv_cpu_info的地址
1637  })
1637  })))->blade_cpu_id = uv_cpu_hub_info(cpu)->nr_possible_cpus++
1638  如果memory_nid恒等于NUMA_NO_NODEmemory_nid等于cpu_to_node(cpu)
1642  如果nodeid不等于numa_node_idpnode恒等于0xffff则pnode等于pnode
1645  否则如果pnode恒等于0xffff则pnode等于pnode
1648  ( & ( & ( * ({
1648  ({
1648  循环
1648  const void * __vpp_verify = NULL
1648  当0循环
1648  __uv_cpu_info的地址
1648  })
1648  })))->scir)->offset = uv_scir_offset(apicid)
1651  for_each_node(nodeid)
1652  pnode等于pnode
1655  如果pnode恒等于0xffff则
1660  pnode等于pnode
1662  min_pnode等于两数取小(pnode, min_pnode)
1663  max_pnode等于两数取大(pnode, max_pnode)
1664  打印信息("UV: UVHUB node:%2d pn:%02x nrcpus:%d\n", nodeid, pnode, nr_possible_cpus)
1670  打印信息("UV: min_pnode:%02x max_pnode:%02x\n", min_pnode, max_pnode)
1671  map_gru_high(max_pnode)
1672  map_mmr_high(max_pnode)
1673  map_mmioh_high(min_pnode, max_pnode)
1675  Per Hub NMI support
1676  Called on each CPU to initialize the per_cpu UV data area.* FIXME: hotplug not supported yet
1677  uv_scir_register_cpu_notifier()
1678  uv_setup_proc_files(0)
1681  pci_register_set_vga_state(Direct Legacy VGA I/O traffic to designated IOH )
1683  Check which reboot to use
调用者
名称描述
uv_system_initThere is a different code path needed to initialize a UV system that does* not have a "UV HUB" (referred to as "hubless").