Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\cacheinfo.c Create Date:2022-07-28 07:53:53
Last Modify:2020-03-16 20:07:28 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:amd_cpuid4

Proto:static void amd_cpuid4(int leaf, union _cpuid4_leaf_eax *eax, union _cpuid4_leaf_ebx *ebx, union _cpuid4_leaf_ecx *ecx)

Type:void

Parameter:

TypeParameterName
intleaf
union _cpuid4_leaf_eax *eax
union _cpuid4_leaf_ebx *ebx
union _cpuid4_leaf_ecx *ecx
239  l1 = l1d
241  full = 0
242  full = 0
243  full = 0
245  cpuid(0x80000005, & dummy, & dummy, & val, & val)
246  cpuid(0x80000006, & dummy, & dummy, & val, & val)
249  Case leaf == 1
250  l1 = l1i
252  Case leaf == 0
253  If Not val Then Return
255  assoc = assocs[assoc]
256  line_size = line_size
257  lines_per_tag = lines_per_tag
258  size_in_kb = size_in_kb
259  Break
260  Case leaf == 2
261  If Not val Then Return
263  assoc = assocs[assoc]
264  line_size = line_size
265  lines_per_tag = lines_per_tag
267  size_in_kb = Operations for contexts that are safe from preemption/interrupts. These* operations verify that preemption is disabled.( KB - valid for CPUS which support this call: )
268  Break
269  Case leaf == 3
270  If Not val Then Return
272  assoc = assocs[assoc]
273  line_size = line_size
274  lines_per_tag = lines_per_tag
275  size_in_kb = size_encoded * 512
277  size_in_kb = size_in_kb >> 1
278  assoc = assoc >> 1
280  Break
281  Default
282  Return
285  is_self_initializing = 1
286  type = types[leaf]
287  level = levels[leaf]
288  num_threads_sharing = 0
289  num_cores_on_die = Operations for contexts that are safe from preemption/interrupts. These* operations verify that preemption is disabled.(cpuid returned max cores value: ) - 1
292  If assoc == 0xffff Then is_fully_associative = 1
294  coherency_line_size = line_size - 1
295  ways_of_associativity = assoc - 1
296  physical_line_partition = lines_per_tag - 1
297  number_of_sets = size_in_kb * 1024 / line_size / (ways_of_associativity + 1) - 1
Caller
NameDescribe
cpuid4_cache_lookup_regs