函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:计算CPU需要校准的时间

函数原型:void calibrate_delay(void)

返回类型:void

参数:

279  this_cpu等于当前cpu ID()
281  如果per_cpu(cpu_loops_per_jiffy, this_cpu)则
282  lpj等于per_cpu(cpu_loops_per_jiffy, this_cpu)
283  如果非printed打印信息("Calibrating delay loop (skipped) already calibrated this CPU")
286  否则如果preset_lpj
287  lpj等于preset_lpj
288  如果非printed打印信息("Calibrating delay loop (skipped) preset value.. ")
291  否则如果非printedlpj_fine
292  lpj等于lpj_fine
293  打印信息("Calibrating delay loop (skipped), value calculated using timer frequency.. ")
295  否则如果lpj等于Check if cpu calibration delay is already known. For example,* some processors with multi-core sockets may have all cores* with the same calibration delay.* Architectures should override this function if a faster calibration* method is available.则否则如果lpj等于calibrate_delay_direct()不等于0则
298  如果非printed打印信息("Calibrating delay using timer specific routine.. ")
301  否则
302  如果非printed打印信息("Calibrating delay loop... ")
304  lpj等于calibrate_delay_converge()
306  per_cpu(cpu_loops_per_jiffy, this_cpu)等于lpj
307  如果非printed打印标准信息("%lu.%02lu BogoMIPS (lpj=%lu)\n", lpj / (500000 / HZ), (lpj / (5000 / HZ)) % 100, lpj)
312  CPU校准速度等于lpj
313  printed = true
315  Indicate the cpu delay calibration is done. This can be used by* architectures to stop accepting delay timer registrations after this point.
调用者
名称描述
smp_callinReport back to the Boot Processor during boot time or to the caller processor* during CPU online.
check_cx686_slopReset the slow-loop (SLOP) bit on the 686(L) which is set by some old* BIOSes for compatibility with DOS games. This makes the udelay loop* work correctly, and improves performance.* FIXME: our newer udelay uses the tsc. We don't need to frob with SLOP
start_kernel启动内核