Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\apic\apic.c Create Date:2022-07-28 08:26:49
Last Modify:2020-03-16 21:21:31 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:calibrate_by_pmtimer

Proto:static int __init calibrate_by_pmtimer(long deltapm, long *delta, long *deltatsc)

Type:int

Parameter:

TypeParameterName
longdeltapm
long *delta
long *deltatsc
758  pm_100ms = Number of PMTMR ticks expected during calibration run / 10
759  pm_thresh = pm_100ms / 100
764  Return -1
767  Define the default level of output to be very little* This can be turned up by using apic=verbose for more* information and apic=debug for _lots_ of information.* apic_verbosity is defined in apic.c(APIC_VERBOSE, "... PM-Timer delta = %ld\n", deltapm)
770  If Not deltapm Then Return -1
773  mult = locksource_hz2mult - calculates mult from hz and shift*@hz: Clocksource frequency in Hz*@shift_constant: Clocksource shift factor* Helper functions that converts a hz counter* frequency to a timsource multiplier, given the* clocksource shift value
775  If deltapm > pm_100ms - pm_thresh && deltapm < pm_100ms + pm_thresh Then
777  Define the default level of output to be very little* This can be turned up by using apic=verbose for more* information and apic=debug for _lots_ of information.* apic_verbosity is defined in apic.c(APIC_VERBOSE, "... PM-Timer result ok\n")
778  Return 0
781  res = deltapm * mult >> 22
782  do_div() is NOT a C function(res, 1000000)
783  pr_warn("APIC calibration not consistent with PM-Timer: %ldms instead of 100ms\n", (long)res)
787  res = delta * pm_100ms
788  do_div() is NOT a C function(res, deltapm)
789  pr_info("APIC delta adjusted to PM-Timer: %lu (%ld)\n", (unsignedlong)res, * delta)
791  delta = res
794  If boot_cpu_has(Time Stamp Counter ) Then
795  res = deltatsc * pm_100ms
796  do_div() is NOT a C function(res, deltapm)
797  Define the default level of output to be very little* This can be turned up by using apic=verbose for more* information and apic=debug for _lots_ of information.* apic_verbosity is defined in apic.c(APIC_VERBOSE, "TSC delta adjusted to PM-Timer: %lu (%ld)\n", (unsignedlong)res, * deltatsc)
800  deltatsc = res
803  Return 0
Caller
NameDescribe
calibrate_APIC_clock