Lines Matching +full:init +full:- +full:delay
1 // SPDX-License-Identifier: GPL-2.0
2 /* calibrate.c: default delay calibration
4 * Excised from init/main.c
9 #include <linux/delay.h>
10 #include <linux/init.h>
28 * loops per jiffy directly, instead of guessing it using delay().
29 * Also, this code tries to handle non-maskable asynchronous events
44 int max = -1; /* index of measured_times with max/min values or not set */ in calibrate_delay_direct()
45 int min = -1; in calibrate_delay_direct()
60 * 1. pre_start <- When we are sure that jiffy switch hasn't happened in calibrate_delay_direct()
62 * 3. start <- timer value before or after jiffy switch in calibrate_delay_direct()
63 * 4. post_start <- When we are sure that jiffy switch has happened in calibrate_delay_direct()
89 timer_rate_max = (post_end - pre_start) / in calibrate_delay_direct()
91 timer_rate_min = (pre_end - post_start) / in calibrate_delay_direct()
104 (timer_rate_max - timer_rate_min) < (timer_rate_max >> 3)) { in calibrate_delay_direct()
118 * Find the maximum & minimum - if they differ too much throw out the in calibrate_delay_direct()
130 if ((measured_times[max] - measured_times[min]) < maxdiff) in calibrate_delay_direct()
133 /* ok - drop the worse value and try again... */ in calibrate_delay_direct()
136 if ((measured_times[max] - estimate) < in calibrate_delay_direct()
137 (estimate - measured_times[min])) { in calibrate_delay_direct()
180 * For the boot cpu we can skip the delay calibration and assign it a value
189 /* First stage - slowly accelerate to find initial bounds */ in calibrate_delay_converge()
213 trials -= band; in calibrate_delay_converge()
234 lpj -= loopadd; in calibrate_delay_converge()
254 * Check if cpu calibration delay is already known. For example,
255 * some processors with multi-core sockets may have all cores
256 * with the same calibration delay.
267 * Indicate the cpu delay calibration is done. This can be used by
268 * architectures to stop accepting delay timer registrations after this point.
284 pr_info("Calibrating delay loop (skipped) " in calibrate_delay()
289 pr_info("Calibrating delay loop (skipped) " in calibrate_delay()
293 pr_info("Calibrating delay loop (skipped), " in calibrate_delay()
299 pr_info("Calibrating delay using timer " in calibrate_delay()
303 pr_info("Calibrating delay loop... "); in calibrate_delay()