Lines Matching +full:switch +full:- +full:frequency +full:- +full:hz

1 // SPDX-License-Identifier: GPL-2.0
29 * Also, this code tries to handle non-maskable asynchronous events
32 #define DELAY_CALIBRATION_TICKS ((HZ < 100) ? 1 : (HZ/100))
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()
55 * will not do. As we don't really know whether jiffy switch in calibrate_delay_direct()
60 * 1. pre_start <- When we are sure that jiffy switch hasn't happened in calibrate_delay_direct()
61 * 2. check jiffy switch 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()
178 * time we refine our estimate after the first takes 1.5/HZ seconds, so try
181 * calculated based on the timer frequency.
182 * For the rest of the CPUs we cannot assume that the timer frequency is same as
183 * the cpu frequency, hence do the calibration for those.
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()
255 * some processors with multi-core sockets may have all cores
294 "value calculated using timer frequency.. "); in calibrate_delay()
309 lpj/(500000/HZ), in calibrate_delay()
310 (lpj/(5000/HZ)) % 100, lpj); in calibrate_delay()