Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:tsc_refine_calibration_work

Proto:static void tsc_refine_calibration_work(struct work_struct *work)

Type:void

Parameter:

TypeParameterName
struct work_struct *work
1292  tsc_start = ULLONG_MAX
1299  If TSC can be unstable due to cpufreq or due to unsynced TSCs Then Go to unreg
1307  If tsc_start == ULLONG_MAX Then
1308  restart :
1313  hpet = is_hpet_enabled()
1314  tsc_start = Read TSC and the reference counters. Take care of any disturbances
1315  schedule_delayed_work - put work task in global workqueue after delay*@dwork: job to be done*@delay: number of jiffies to wait or 0 for immediate execution* After waiting for a given time this puts a job in the kernel-global* workqueue.
1316  Return
1319  tsc_stop = Read TSC and the reference counters. Take care of any disturbances
1322  If ref_start == ref_stop Then Go to out
1326  If tsc_stop == ULLONG_MAX Then Go to restart
1329  delta = tsc_stop - tsc_start
1330  delta *= 1000000LL
1331  If hpet Then freq = Calculate the TSC frequency from HPET reference
1333  Else freq = Calculate the TSC frequency from PMTimer reference
1337  If abs - return absolute value of an argument*@x: the value. If it is unsigned type, it is converted to signed type first.* char is treated as if it was signed (regardless of whether it really is)* but the macro's return type is preserved as char.(tsc_khz - freq) > tsc_khz / 100 Then Go to out
1340  tsc_khz = freq
1341  pr_info("Refined TSC clocksource calibration: %lu.%03lu MHz\n", (unsignedlong)tsc_khz / 1000, (unsignedlong)tsc_khz % 1000)
1346  lapic_update_tsc_freq()
1349  for_each_possible_cpu(cpu)
1350  set_cyc2ns_scale(tsc_khz, cpu, tsc_stop)
1352  out :
1353  If TSC can be unstable due to cpufreq or due to unsynced TSCs Then Go to unreg
1356  If boot_cpu_has(Always running timer (ART) ) Then art_related_clocksource = Must mark VALID_FOR_HRES early such that when we unregister tsc_early* this one will immediately take over. We will only register if TSC has* been found good.
1358  clocksource_register_khz( & Must mark VALID_FOR_HRES early such that when we unregister tsc_early* this one will immediately take over. We will only register if TSC has* been found good., tsc_khz)
1359  unreg :
1360  clocksource_unregister( & .mask MUST be CLOCKSOURCE_MASK(64). See comment above read_tsc())