Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\amd.c Create Date:2022-07-28 07:58:13
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) AMD multi-node processors* Assumption: Number of cores in each internal node is the same.* (2) AMD processors supporting compute units

Proto:static void amd_get_topology(struct cpuinfo_x86 *c)

Type:void

Parameter:

TypeParameterName
struct cpuinfo_x86 *c
339  cpu = smp_processor_id()
342  If boot_cpu_has(Topology extensions CPUID leafs ) Then
346  cpuid(0x8000001e, & eax, & ebx, & ecx, & edx)
348  node_id = ecx & 0xff
350  If CPU family == 0x15 Then cu_id = ebx & 0xff
353  If CPU family >= 0x17 Then
354  Core id: = ebx & 0xff
364  err = Check for extended topology enumeration cpuid leaf, and if it* exists, use it for populating initial_apicid and cpu topology* detection.
365  If Not err Then CPUID returned core id bits: = get_count_order(cpuid returned max cores value: )
368  cacheinfo_amd_init_llc_id(c, cpu, node_id)
370  Else if cpu_has(c, NodeId MSR ) Then
373  rdmsrl(MSR_FAM10H_NODE_ID, value)
374  node_id = value & 7
376  per_cpu(Last level cache ID of each logical CPU , cpu) = node_id
377  Else Return
380  If des_per_socket: Stores the number of nodes per socket.* Refer to Fam15h Models 00-0fh BKDG - CPUID Fn8000_001E_ECX* Node Identifiers[10:8] > 1 Then
381  set_cpu_cap(c, AMD multi-node processor )
382  Fix up cpu_core_id for pre-F17h systems to be in the* [0 .. cores_per_node - 1] range. Not really needed but* kept so as not to break existing setups.
Caller
NameDescribe
init_amd