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()
115 EXT_KEY(ZICOND); in hwprobe_isa_ext0()
169 pair->value &= ~missing; in hwprobe_isa_ext0()
184 u64 perf = -1ULL; in hwprobe_misaligned()
189 if (perf == -1ULL) in hwprobe_misaligned()
198 if (perf == -1ULL) in hwprobe_misaligned()
220 u64 perf = -1ULL; in hwprobe_vec_misaligned()
226 if (perf == -1ULL) in hwprobe_vec_misaligned()
235 if (perf == -1ULL) in hwprobe_vec_misaligned()
256 switch (pair->key) { in hwprobe_one_pair()
263 * The kernel already assumes that the base single-letter ISA in hwprobe_one_pair()
269 pair->value = RISCV_HWPROBE_BASE_BEHAVIOR_IMA; in hwprobe_one_pair()
278 pair->value = hwprobe_misaligned(cpus); in hwprobe_one_pair()
282 pair->value = hwprobe_vec_misaligned(cpus); in hwprobe_one_pair()
286 pair->value = 0; in hwprobe_one_pair()
288 pair->value = riscv_cboz_block_size; in hwprobe_one_pair()
291 pair->value = 0; in hwprobe_one_pair()
293 pair->value = riscv_cbom_block_size; in hwprobe_one_pair()
296 pair->value = user_max_virt_addr(); in hwprobe_one_pair()
300 pair->value = riscv_timebase; in hwprobe_one_pair()
309 * call, but get their element key set to -1 and value set to 0 in hwprobe_one_pair()
313 pair->key = -1; in hwprobe_one_pair()
314 pair->value = 0; in hwprobe_one_pair()
330 return -EINVAL; in hwprobe_get_values()
346 return -EFAULT; in hwprobe_get_values()
354 return -EINVAL; in hwprobe_get_values()
360 if (get_user(pair.key, &pairs->key)) in hwprobe_get_values()
361 return -EFAULT; in hwprobe_get_values()
365 ret = put_user(pair.key, &pairs->key); in hwprobe_get_values()
367 ret = put_user(pair.value, &pairs->value); in hwprobe_get_values()
370 return -EFAULT; in hwprobe_get_values()
387 return -EINVAL; in hwprobe_get_cpus()
390 return -EINVAL; in hwprobe_get_cpus()
397 return -EFAULT; in hwprobe_get_cpus()
412 return -EFAULT; in hwprobe_get_cpus()
416 pair = (struct riscv_hwprobe){ .key = -1, }; in hwprobe_get_cpus()
419 return -EFAULT; in hwprobe_get_cpus()
444 return -EFAULT; in hwprobe_get_cpus()
481 avd->all_cpu_hwprobe_values[key] = pair.value; in init_hwprobe_vdso_data()
494 * populated) or any value returns -1 (varies across CPUs), then the in init_hwprobe_vdso_data()
497 avd->homogeneous_cpus = id_bitsmash != 0 && id_bitsmash != -1; in init_hwprobe_vdso_data()