Lines Matching full:pair
22 static void hwprobe_arch_id(struct riscv_hwprobe *pair, in hwprobe_arch_id() argument
32 switch (pair->key) { in hwprobe_arch_id()
59 pair->value = id; in hwprobe_arch_id()
62 static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, in hwprobe_isa_ext0() argument
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()
88 pair->value |= RISCV_HWPROBE_EXT_##ext; \ in hwprobe_isa_ext0()
169 pair->value &= ~missing; in hwprobe_isa_ext0()
174 struct riscv_hwprobe pair; in hwprobe_ext0_has() local
176 hwprobe_isa_ext0(&pair, cpus); in hwprobe_ext0_has()
177 return (pair.value & ext); in hwprobe_ext0_has()
253 static void hwprobe_one_pair(struct riscv_hwprobe *pair, in hwprobe_one_pair() argument
256 switch (pair->key) { in hwprobe_one_pair()
260 hwprobe_arch_id(pair, cpus); in hwprobe_one_pair()
269 pair->value = RISCV_HWPROBE_BASE_BEHAVIOR_IMA; in hwprobe_one_pair()
273 hwprobe_isa_ext0(pair, cpus); 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()
304 hwprobe_isa_vendor_ext_thead_0(pair, cpus); in hwprobe_one_pair()
313 pair->key = -1; in hwprobe_one_pair()
314 pair->value = 0; in hwprobe_one_pair()
358 struct riscv_hwprobe pair; in hwprobe_get_values() local
360 if (get_user(pair.key, &pairs->key)) in hwprobe_get_values()
363 pair.value = 0; in hwprobe_get_values()
364 hwprobe_one_pair(&pair, &cpus); 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()
407 struct riscv_hwprobe pair, tmp; in hwprobe_get_cpus() local
410 ret = copy_from_user(&pair, &pairs[i], sizeof(pair)); in hwprobe_get_cpus()
414 if (!riscv_hwprobe_key_is_valid(pair.key)) { in hwprobe_get_cpus()
416 pair = (struct riscv_hwprobe){ .key = -1, }; in hwprobe_get_cpus()
417 ret = copy_to_user(&pairs[i], &pair, sizeof(pair)); in hwprobe_get_cpus()
425 tmp = (struct riscv_hwprobe){ .key = pair.key, }; in hwprobe_get_cpus()
432 if (!riscv_hwprobe_pair_cmp(&tmp, &pair)) in hwprobe_get_cpus()
468 struct riscv_hwprobe pair; in init_hwprobe_vdso_data() local
476 pair.key = key; in init_hwprobe_vdso_data()
477 hwprobe_one_pair(&pair, cpu_online_mask); in init_hwprobe_vdso_data()
479 WARN_ON_ONCE(pair.key < 0); in init_hwprobe_vdso_data()
481 avd->all_cpu_hwprobe_values[key] = pair.value; in init_hwprobe_vdso_data()
487 id_bitsmash |= pair.value; in init_hwprobe_vdso_data()