Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:arch_freq_get_on_cpu

Proto:unsigned int arch_freq_get_on_cpu(int cpu)

Type:unsigned int

Parameter:

TypeParameterName
intcpu
121  If Not TSC clocks / usec, not used here Then Return 0
124  If Not boot_cpu_has(P-State hardware coordination feedback capability (APERF/MPERF MSRs) ) Then Return 0
127  If Not housekeeping_cpu(cpu, HK_FLAG_MISC) Then Return 0
130  If aperfmperf_snapshot_cpu(cpu, ktime_get(), true) Then Return per_cpu(khz, cpu)
133  msleep(APERFMPERF_REFRESH_DELAY_MS)
134  smp_call_function_single(cpu, aperfmperf_snapshot_khz()* On the current CPU, snapshot APERF, MPERF, and jiffies* unless we already did it within 10ms* calculate kHz, save snapshot, NULL, 1)
136  Return per_cpu(khz, cpu)