函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\amd.c Create Date:2022-07-27 08:58:39
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:static void amd_get_topology(struct cpuinfo_x86 *c)

返回类型:void

参数:

类型参数名称
struct cpuinfo_x86 *c
339  cpu等于当前cpu ID()
342  如果boot_cpu_has(Topology extensions CPUID leafs )则
346  cpuid(0x8000001e, & eax, & ebx, & ecx, & edx)
348  node_id等于ecx按位与0xff
350  如果CPU family 恒等于0x15则cu_id等于ebx按位与0xff
353  如果CPU family 大于等于0x17则
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  如果非errCPUID returned core id bits: 等于get_count_order(cpuid returned max cores value: )
368  cacheinfo_amd_init_llc_id(c, cpu, node_id)
370  否则如果cpu_has(c, NodeId MSR )则
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  否则返回
380  如果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则
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.
调用者
名称描述
init_amd