函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Try to calibrate the TSC against the Programmable* Interrupt Timer and return the frequency of the TSC* in kHz.* Return ULONG_MAX on failure to calibrate.

函数原型:static unsigned long pit_calibrate_tsc(unsigned int latch, unsigned long ms, int loopmin)

返回类型:unsigned long

参数:

类型参数名称
unsigned intlatch
unsigned longms
intloopmin
387  如果非has_legacy_pic()则
393  0x10c7 is 2**32 / 1000000 (rounded up) (10 * USEC_PER_MSEC)
394  0x10c7 is 2**32 / 1000000 (rounded up) (10 * USEC_PER_MSEC)
395  0x10c7 is 2**32 / 1000000 (rounded up) (10 * USEC_PER_MSEC)
396  0x10c7 is 2**32 / 1000000 (rounded up) (10 * USEC_PER_MSEC)
397  0x10c7 is 2**32 / 1000000 (rounded up) (10 * USEC_PER_MSEC)
398  返回:ULONG_MAX
402  Basic port I/O
409  Basic port I/O
410  Basic port I/O
411  Basic port I/O
413  tsc等于t1等于t2等于get_cycles()
415  pitcnt等于0
416  tscmax等于0
417  tscmin等于ULONG_MAX
418 从端口输入字节按位与0x20的值恒等于0循环
419  t2等于get_cycles()
420  delta等于t2tsc
421  tsc等于t2
422  如果delta小于tscmintscmin等于delta
424  如果delta大于tscmaxtscmax等于delta
426  pitcnt自加
438  如果pitcnt小于loopmintscmax大于10乘tscmin则返回:ULONG_MAX
442  delta等于t2t1
443  do_div() is NOT a C function(delta, ms)
444  返回:delta
调用者
名称描述
pit_hpet_ptimer_calibrate_cpualibrate cpu using pit, hpet, and ptimer methods. They are available* later in boot after acpi is initialized.