Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:init\calibrate.c Create Date:2022-07-28 13:55:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:calibrate_delay

Proto:void calibrate_delay(void)

Type:void

Parameter:Nothing

279  this_cpu = smp_processor_id()
281  If per_cpu(cpu_loops_per_jiffy, this_cpu) Then
282  lpj = per_cpu(cpu_loops_per_jiffy, this_cpu)
283  If Not printed Then pr_info("Calibrating delay loop (skipped) already calibrated this CPU")
286  Else if preset_lpj Then
287  lpj = preset_lpj
288  If Not printed Then pr_info("Calibrating delay loop (skipped) preset value.. ")
291  Else if Not printed && lpj_fine Then
292  lpj = lpj_fine
293  pr_info("Calibrating delay loop (skipped), value calculated using timer frequency.. ")
295  Else if 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. Then Else if (lpj = calibrate_delay_direct()) != 0 Then
298  If Not printed Then pr_info("Calibrating delay using timer specific routine.. ")
301  Else
302  If Not printed Then pr_info("Calibrating delay loop... ")
304  lpj = calibrate_delay_converge()
306  per_cpu(cpu_loops_per_jiffy, this_cpu) = lpj
307  If Not printed Then Like KERN_CONT, pr_cont() should only be used when continuing* a line with no newline ('\n') enclosed. Otherwise it defaults* back to KERN_DEFAULT.("%lu.%02lu BogoMIPS (lpj=%lu)\n", lpj / (500000 / HZ), (lpj / (5000 / HZ)) % 100, lpj)
312  This should be approx 2 Bo*oMips to start (note initial shift), and will* still work even if initially too large, it will just take slightly longer = 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.
Caller
NameDescribe
smp_callinReport back to the Boot Processor during boot time or to the caller processor* during CPU online.