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:44
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:uv_system_init_hub

Proto:static void __init uv_system_init_hub(void)

Type:void

Parameter:Nothing

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  If Not hub Then
1564  pr_err("UV: Unknown/unsupported UV hub\n")
1565  Return
1567  pr_info("UV: Found %s hub\n", hub)
1569  map_low_mmrs()
1572  uv_bios_init()
1575  If decode_uv_systab() < 0 Then Return
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  If Not The following values are used for the per node hub info struct Then 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  pr_info("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 = size of * * uv_num_possible_blades()
1594  __uv_hub_info_list = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
1595  BUG_ON(!__uv_hub_info_list)
1597  bytes = sizeof(structuv_hub_info_s)
1598  for_each_node(nodeid)
1601  If __uv_hub_info_list[nodeid] Then
1602  pr_err("UV: Node %d UV HUB already initialized!?\n", nodeid)
1603  BUG()
1607  new_hub = If nodeid == 0 Then uv_hub_info_node0 Else kzalloc_node - allocate zeroed memory from a particular memory node.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).*@node: memory node from which to allocate
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  If The following values are used for the per node hub info struct Then pnode = The following values are used for the per node hub info struct [nodeid]
1617  Else 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  for_each_possible_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  Do
1636  const void * __vpp_verify = NULL
1636  When 0 cycle
1636  &__uv_cpu_info
1636  })
1636  })))->p_uv_hub_info = uv_hub_info_list(nodeid)
1637  ( & ( * ({
1637  ({
1637  Do
1637  const void * __vpp_verify = NULL
1637  When 0 cycle
1637  &__uv_cpu_info
1637  })
1637  })))->blade_cpu_id = uv_cpu_hub_info(cpu)->nr_possible_cpus++
1638  If memory_nid == NUMA_NO_NODE Then memory_nid = cpu_to_node(cpu)
1642  If nodeid != numa_node_id && pnode == 0xffff Then pnode = pnode
1645  Else if pnode == 0xffff Then pnode = pnode
1648  ( & ( & ( * ({
1648  ({
1648  Do
1648  const void * __vpp_verify = NULL
1648  When 0 cycle
1648  &__uv_cpu_info
1648  })
1648  })))->scir)->offset = uv_scir_offset(apicid)
1651  for_each_node(nodeid)
1652  pnode = pnode
1655  If pnode == 0xffff Then
1660  pnode = pnode
1662  min_pnode = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(pnode, min_pnode)
1663  max_pnode = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(pnode, max_pnode)
1664  pr_info("UV: UVHUB node:%2d pn:%02x nrcpus:%d\n", nodeid, pnode, nr_possible_cpus)
1670  pr_info("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
Caller
NameDescribe
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").