Lines Matching +full:test +full:- +full:cpu

1 // SPDX-License-Identifier: GPL-2.0
17 #include <asm/r4k-timer.h>
35 * we want to have the fastest, inlined, non-debug version
36 * of a critical section, to be able to prove counter time-warps:
60 * another CPU) and update the previous counter timestamp. in check_counter_warp()
82 * we saw a time-warp of the counter going backwards: in check_counter_warp()
86 max_warp = max(max_warp, prev - now); in check_counter_warp()
90 * one CPU should observe time going backwards. in check_counter_warp()
99 WARN(!(now-start), in check_counter_warp()
101 now-start, end-start); in check_counter_warp()
106 * The freshly booted CPU initiates this via an async SMP function call.
110 unsigned int cpu = (unsigned long)__cpu; in check_counter_sync_source() local
116 while (atomic_read(&start_count) != cpus - 1) in check_counter_sync_source()
126 while (atomic_read(&stop_count) != cpus-1) in check_counter_sync_source()
130 * If the test was successful set the number of runs to zero and in check_counter_sync_source()
137 pr_info("Counter synchronization [CPU#%d -> CPU#%u]: passed\n", in check_counter_sync_source()
138 smp_processor_id(), cpu); in check_counter_sync_source()
143 pr_info("Counter synchronization [CPU#%d -> CPU#%u]:\n", in check_counter_sync_source()
144 smp_processor_id(), cpu); in check_counter_sync_source()
151 * Reset it - just in case we boot another CPU later: in check_counter_sync_source()
174 void synchronise_count_slave(int cpu) in synchronise_count_slave() argument
182 /* Kick the control CPU into the counter synchronization function */ in synchronise_count_slave()
185 (unsigned long *)(unsigned long)cpu, 0); in synchronise_count_slave()
188 * Register this CPU's participation and wait for the in synchronise_count_slave()
189 * source CPU to start the measurement: in synchronise_count_slave()
208 * Wait for the source CPU to print stuff: in synchronise_count_slave()
214 * Reset it for the next sync test: in synchronise_count_slave()
219 * Check the number of remaining test runs. If not zero, the test in synchronise_count_slave()
221 * test was either successful or failed terminally. in synchronise_count_slave()
230 * If the warp value of this CPU is 0, then the other CPU in synchronise_count_slave()
235 cur_max_warp = -gbl_max_warp; in synchronise_count_slave()
241 pr_debug("Counter compensate: CPU%u observed %d warp\n", cpu, cur_max_warp); in synchronise_count_slave()