函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:alled before apb_timer_enable, use early map

函数原型:unsigned long apbt_quick_calibrate(void)

返回类型:unsigned long

参数:

355  khz等于0
358  apbt_set_mapping()
359  dw_apb_clocksource_start(clocksource_apbt)
362  old等于dw_apb_clocksource_read(clocksource_apbt)
363  i等于10000
364 i先自减循环
365  如果old不等于dw_apb_clocksource_read(clocksource_apbt)则退出
368  如果非i则转到:failed
372  loop等于Common DW APB timer info除1000左移4位
375  dw_apb_clocksource_start(clocksource_apbt)
377  old等于dw_apb_clocksource_read(clocksource_apbt)
378  old加等于loop
380  t1等于dtsc() - returns the current TSC without ordering constraints* rdtsc() returns the result of RDTSC as a 64-bit integer
382  循环
383  new等于dw_apb_clocksource_read(clocksource_apbt)
384 new小于old循环
386  t2等于dtsc() - returns the current TSC without ordering constraints* rdtsc() returns the result of RDTSC as a 64-bit integer
388  shift等于5
389  如果此条件成立可能性小(为编译器优化)(loop >> shift == 0)则
390  printk(formational "APBT TSC calibration failed, not enough resolution\n")
392  返回:0
394  scale等于div_u64 - unsigned 64bit divide with 32bit divisor*@dividend: unsigned 64bit dividend*@divisor: unsigned 32bit divisor* This is the most common 64bit divide and should be used if possible,* as many 32bit archs can optimize this variant better than a full
395  khz等于scaleCommon DW APB timer info除1000右移shift
396  printk(formational "TSC freq calculated by APB timer is %lu khz\n", khz)
397  返回:khz
398  failed :
399  返回:0