函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

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

返回类型:void

参数:

类型参数名称
struct cpuinfo_x86 *c
68  cpu等于当前cpu ID()
71  如果boot_cpu_has(Topology extensions CPUID leafs )则
75  cpuid(0x8000001e, & eax, & ebx, & ecx, & edx)
77  node_id等于ecx按位与0xff
79  Core id: 等于ebx按位与0xff
81  如果Number of siblings per CPU package 大于1则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  如果非errCPUID 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  否则如果cpu_has(c, NodeId MSR )则
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  否则返回
106  如果des_per_socket: Stores the number of nodes per socket.* Refer to CPUID Fn8000_001E_ECX Node Identifiers[10:8]大于1则set_cpu_cap(c, AMD multi-node processor )
调用者
名称描述
init_hygon