Lines Matching +full:fast +full:- +full:speed

1 // SPDX-License-Identifier: GPL-2.0-only
17 #include "copy-unaligned.h"
22 #define MISALIGNED_COPY_SIZE ((MISALIGNED_BUFFER_SIZE / 2) - 0x80)
44 long speed = RISCV_HWPROBE_MISALIGNED_SCALAR_SLOW; in check_unaligned_access() local
54 word_cycles = -1ULL; in check_unaligned_access()
74 if ((end_cycles - start_cycles) < word_cycles) in check_unaligned_access()
75 word_cycles = end_cycles - start_cycles; in check_unaligned_access()
78 byte_cycles = -1ULL; in check_unaligned_access()
90 if ((end_cycles - start_cycles) < byte_cycles) in check_unaligned_access()
91 byte_cycles = end_cycles - start_cycles; in check_unaligned_access()
98 pr_warn("cpu%d: rdtime lacks granularity needed to measure unaligned access speed\n", in check_unaligned_access()
105 speed = RISCV_HWPROBE_MISALIGNED_SCALAR_FAST; in check_unaligned_access()
112 (speed == RISCV_HWPROBE_MISALIGNED_SCALAR_FAST) ? "fast" : "slow"); in check_unaligned_access()
114 per_cpu(misaligned_access_speed, cpu) = speed; in check_unaligned_access()
120 if (speed == RISCV_HWPROBE_MISALIGNED_SCALAR_FAST) in check_unaligned_access()
137 /* Measure unaligned access speed on all CPUs present at boot in parallel. */
205 modify_unaligned_access_branches(&fast_except_me, num_online_cpus() - 1); in set_unaligned_access_static_branches_except_cpu()
212 * result of unaligned access speed for all CPUs will be available. in set_unaligned_access_static_branches()
255 return -ENOMEM; in riscv_online_cpu()
288 long speed = RISCV_HWPROBE_MISALIGNED_VECTOR_SLOW; in check_vector_unaligned_access() local
304 word_cycles = -1ULL; in check_vector_unaligned_access()
326 if ((end_cycles - start_cycles) < word_cycles) in check_vector_unaligned_access()
327 word_cycles = end_cycles - start_cycles; in check_vector_unaligned_access()
330 byte_cycles = -1ULL; in check_vector_unaligned_access()
344 if ((end_cycles - start_cycles) < byte_cycles) in check_vector_unaligned_access()
345 byte_cycles = end_cycles - start_cycles; in check_vector_unaligned_access()
352 pr_warn("cpu%d: rdtime lacks granularity needed to measure unaligned vector access speed\n", in check_vector_unaligned_access()
359 speed = RISCV_HWPROBE_MISALIGNED_VECTOR_FAST; in check_vector_unaligned_access()
366 (speed == RISCV_HWPROBE_MISALIGNED_VECTOR_FAST) ? "fast" : "slow"); in check_vector_unaligned_access()
368 per_cpu(vector_misaligned_access, cpu) = speed; in check_vector_unaligned_access()
374 /* Measure unaligned access speed on all CPUs present at boot in parallel. */
406 static const char * const speed_str[] __initconst = { NULL, NULL, "slow", "fast", "unsupported" };
417 return -EINVAL; in set_unaligned_scalar_speed_param()
432 return -EINVAL; in set_unaligned_vector_speed_param()
443 pr_info("scalar unaligned access speed set to '%s' (%lu) by command line\n", in check_unaligned_access_all_cpus()
457 pr_info("vector unaligned access speed set to '%s' (%lu) by command line\n", in check_unaligned_access_all_cpus()