Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Fixup core topology information for* (1) Hygon multi-node processors* Assumption: Number of cores in each internal node is the same.* (2) Hygon processors supporting compute units

Proto:static void hygon_get_topology(struct cpuinfo_x86 *c)

Type:void

Parameter:

TypeParameterName
struct cpuinfo_x86 *c
68  cpu = smp_processor_id()
71  If boot_cpu_has(Topology extensions CPUID leafs ) Then
75  cpuid(0x8000001e, & eax, & ebx, & ecx, & edx)
77  node_id = ecx & 0xff
79  Core id: = ebx & 0xff
81  If Number of siblings per CPU package > 1 Then cpuid returned max cores value: /= Number of siblings per CPU package
88  err = Check for extended topology enumeration cpuid leaf, and if it* exists, use it for populating initial_apicid and cpu topology* detection.
89  If Not err Then CPUID returned core id bits: = get_count_order(cpuid returned max cores value: )
93  Physical processor id: = apicid >> APICID_SOCKET_ID_BIT
95  cacheinfo_hygon_init_llc_id(c, cpu, node_id)
96  Else if cpu_has(c, NodeId MSR ) Then
99  rdmsrl(MSR_FAM10H_NODE_ID, value)
100  node_id = value & 7
102  per_cpu(Last level cache ID of each logical CPU , cpu) = node_id
103  Else Return
106  If des_per_socket: Stores the number of nodes per socket.* Refer to CPUID Fn8000_001E_ECX Node Identifiers[10:8] > 1 Then set_cpu_cap(c, AMD multi-node processor )
Caller
NameDescribe
init_hygon