Lines Matching +full:riscv +full:- +full:zicond

1 // SPDX-License-Identifier: GPL-2.0-only
4 * are supported by the hardware. See Documentation/arch/riscv/hwprobe.rst for
25 u64 id = -1ULL; in hwprobe_arch_id()
32 switch (pair->key) { in hwprobe_arch_id()
50 * If there's a mismatch for the given set, return -1 in the in hwprobe_arch_id()
54 id = -1ULL; in hwprobe_arch_id()
59 pair->value = id; in hwprobe_arch_id()
68 pair->value = 0; in hwprobe_isa_ext0()
70 pair->value |= RISCV_HWPROBE_IMA_FD; in hwprobe_isa_ext0()
73 pair->value |= RISCV_HWPROBE_IMA_C; in hwprobe_isa_ext0()
76 pair->value |= RISCV_HWPROBE_IMA_V; in hwprobe_isa_ext0()
87 if (__riscv_isa_extension_available(isainfo->isa, RISCV_ISA_EXT_##ext)) \ in hwprobe_isa_ext0()
88 pair->value |= RISCV_HWPROBE_EXT_##ext; \ in hwprobe_isa_ext0()
111 EXT_KEY(ZICOND); in hwprobe_isa_ext0()
161 pair->value &= ~missing; in hwprobe_isa_ext0()
176 u64 perf = -1ULL; in hwprobe_misaligned()
181 if (perf == -1ULL) in hwprobe_misaligned()
190 if (perf == -1ULL) in hwprobe_misaligned()
212 u64 perf = -1ULL; in hwprobe_vec_misaligned()
218 if (perf == -1ULL) in hwprobe_vec_misaligned()
227 if (perf == -1ULL) in hwprobe_vec_misaligned()
248 switch (pair->key) { in hwprobe_one_pair()
255 * The kernel already assumes that the base single-letter ISA in hwprobe_one_pair()
261 pair->value = RISCV_HWPROBE_BASE_BEHAVIOR_IMA; in hwprobe_one_pair()
270 pair->value = hwprobe_misaligned(cpus); in hwprobe_one_pair()
274 pair->value = hwprobe_vec_misaligned(cpus); in hwprobe_one_pair()
278 pair->value = 0; in hwprobe_one_pair()
280 pair->value = riscv_cboz_block_size; in hwprobe_one_pair()
283 pair->value = user_max_virt_addr(); in hwprobe_one_pair()
287 pair->value = riscv_timebase; in hwprobe_one_pair()
296 * call, but get their element key set to -1 and value set to 0 in hwprobe_one_pair()
300 pair->key = -1; in hwprobe_one_pair()
301 pair->value = 0; in hwprobe_one_pair()
317 return -EINVAL; in hwprobe_get_values()
333 return -EFAULT; in hwprobe_get_values()
341 return -EINVAL; in hwprobe_get_values()
347 if (get_user(pair.key, &pairs->key)) in hwprobe_get_values()
348 return -EFAULT; in hwprobe_get_values()
352 ret = put_user(pair.key, &pairs->key); in hwprobe_get_values()
354 ret = put_user(pair.value, &pairs->value); in hwprobe_get_values()
357 return -EFAULT; in hwprobe_get_values()
374 return -EINVAL; in hwprobe_get_cpus()
377 return -EINVAL; in hwprobe_get_cpus()
384 return -EFAULT; in hwprobe_get_cpus()
399 return -EFAULT; in hwprobe_get_cpus()
403 pair = (struct riscv_hwprobe){ .key = -1, }; in hwprobe_get_cpus()
406 return -EFAULT; in hwprobe_get_cpus()
431 return -EFAULT; in hwprobe_get_cpus()
454 struct arch_vdso_time_data *avd = &vd->arch_data; in init_hwprobe_vdso_data()
469 avd->all_cpu_hwprobe_values[key] = pair.value; in init_hwprobe_vdso_data()
482 * populated) or any value returns -1 (varies across CPUs), then the in init_hwprobe_vdso_data()
485 avd->homogeneous_cpus = id_bitsmash != 0 && id_bitsmash != -1; in init_hwprobe_vdso_data()