Lines Matching +full:riscv +full:- +full:zacas
1 // SPDX-License-Identifier: GPL-2.0-only
4 * are supported by the hardware. See Documentation/arch/riscv/hwprobe.rst for
30 u64 id = -1ULL; in hwprobe_arch_id()
34 if (pair->key != RISCV_HWPROBE_KEY_MVENDORID && in hwprobe_arch_id()
35 pair->key != RISCV_HWPROBE_KEY_MIMPID && in hwprobe_arch_id()
36 pair->key != RISCV_HWPROBE_KEY_MARCHID) in hwprobe_arch_id()
42 switch (pair->key) { in hwprobe_arch_id()
60 * If there's a mismatch for the given set, return -1 in the in hwprobe_arch_id()
64 id = -1ULL; in hwprobe_arch_id()
70 pair->value = id; in hwprobe_arch_id()
79 pair->value = 0; in hwprobe_isa_ext0()
81 pair->value |= RISCV_HWPROBE_IMA_FD; in hwprobe_isa_ext0()
84 pair->value |= RISCV_HWPROBE_IMA_C; in hwprobe_isa_ext0()
87 pair->value |= RISCV_HWPROBE_IMA_V; in hwprobe_isa_ext0()
98 if (__riscv_isa_extension_available(isainfo->isa, RISCV_ISA_EXT_##ext)) \ in hwprobe_isa_ext0()
99 pair->value |= RISCV_HWPROBE_EXT_##ext; \ in hwprobe_isa_ext0()
111 EXT_KEY(ZACAS); in hwprobe_isa_ext0()
179 pair->value &= ~missing; in hwprobe_isa_ext0()
194 u64 perf = -1ULL; in hwprobe_misaligned()
199 if (perf == -1ULL) in hwprobe_misaligned()
208 if (perf == -1ULL) in hwprobe_misaligned()
230 u64 perf = -1ULL; in hwprobe_vec_misaligned()
236 if (perf == -1ULL) in hwprobe_vec_misaligned()
245 if (perf == -1ULL) in hwprobe_vec_misaligned()
266 switch (pair->key) { in hwprobe_one_pair()
273 * The kernel already assumes that the base single-letter ISA in hwprobe_one_pair()
279 pair->value = RISCV_HWPROBE_BASE_BEHAVIOR_IMA; in hwprobe_one_pair()
288 pair->value = hwprobe_misaligned(cpus); in hwprobe_one_pair()
292 pair->value = hwprobe_vec_misaligned(cpus); in hwprobe_one_pair()
296 pair->value = 0; in hwprobe_one_pair()
298 pair->value = riscv_cboz_block_size; in hwprobe_one_pair()
301 pair->value = 0; in hwprobe_one_pair()
303 pair->value = riscv_cbom_block_size; in hwprobe_one_pair()
306 pair->value = user_max_virt_addr(); in hwprobe_one_pair()
310 pair->value = riscv_timebase; in hwprobe_one_pair()
326 * call, but get their element key set to -1 and value set to 0 in hwprobe_one_pair()
330 pair->key = -1; in hwprobe_one_pair()
331 pair->value = 0; in hwprobe_one_pair()
347 return -EINVAL; in hwprobe_get_values()
363 return -EFAULT; in hwprobe_get_values()
371 return -EINVAL; in hwprobe_get_values()
377 if (get_user(pair.key, &pairs->key)) in hwprobe_get_values()
378 return -EFAULT; in hwprobe_get_values()
382 ret = put_user(pair.key, &pairs->key); in hwprobe_get_values()
384 ret = put_user(pair.value, &pairs->value); in hwprobe_get_values()
387 return -EFAULT; in hwprobe_get_values()
404 return -EINVAL; in hwprobe_get_cpus()
407 return -EINVAL; in hwprobe_get_cpus()
414 return -EFAULT; in hwprobe_get_cpus()
429 return -EFAULT; in hwprobe_get_cpus()
433 pair = (struct riscv_hwprobe){ .key = -1, }; in hwprobe_get_cpus()
436 return -EFAULT; in hwprobe_get_cpus()
461 return -EFAULT; in hwprobe_get_cpus()
502 avd->all_cpu_hwprobe_values[key] = pair.value; in complete_hwprobe_vdso_data()
515 * populated) or any value returns -1 (varies across CPUs), then the in complete_hwprobe_vdso_data()
518 avd->homogeneous_cpus = id_bitsmash != 0 && id_bitsmash != -1; in complete_hwprobe_vdso_data()
526 avd->ready = true; in complete_hwprobe_vdso_data()
538 avd->ready = false; in init_hwprobe_vdso_data()