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()
161 pair->value &= ~missing; in hwprobe_isa_ext0()
166 struct riscv_hwprobe pair; in hwprobe_ext0_has() local
168 hwprobe_isa_ext0(&pair, cpus); in hwprobe_ext0_has()
169 return (pair.value & ext); in hwprobe_ext0_has()
245 static void hwprobe_one_pair(struct riscv_hwprobe *pair, in hwprobe_one_pair() argument
248 switch (pair->key) { in hwprobe_one_pair()
252 hwprobe_arch_id(pair, cpus); in hwprobe_one_pair()
261 pair->value = RISCV_HWPROBE_BASE_BEHAVIOR_IMA; in hwprobe_one_pair()
265 hwprobe_isa_ext0(pair, cpus); 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()
291 hwprobe_isa_vendor_ext_thead_0(pair, cpus); in hwprobe_one_pair()
300 pair->key = -1; in hwprobe_one_pair()
301 pair->value = 0; in hwprobe_one_pair()
345 struct riscv_hwprobe pair; in hwprobe_get_values() local
347 if (get_user(pair.key, &pairs->key)) in hwprobe_get_values()
350 pair.value = 0; in hwprobe_get_values()
351 hwprobe_one_pair(&pair, &cpus); 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()
394 struct riscv_hwprobe pair, tmp; in hwprobe_get_cpus() local
397 ret = copy_from_user(&pair, &pairs[i], sizeof(pair)); in hwprobe_get_cpus()
401 if (!riscv_hwprobe_key_is_valid(pair.key)) { in hwprobe_get_cpus()
403 pair = (struct riscv_hwprobe){ .key = -1, }; in hwprobe_get_cpus()
404 ret = copy_to_user(&pairs[i], &pair, sizeof(pair)); in hwprobe_get_cpus()
412 tmp = (struct riscv_hwprobe){ .key = pair.key, }; in hwprobe_get_cpus()
419 if (!riscv_hwprobe_pair_cmp(&tmp, &pair)) in hwprobe_get_cpus()
456 struct riscv_hwprobe pair; in init_hwprobe_vdso_data() local
464 pair.key = key; in init_hwprobe_vdso_data()
465 hwprobe_one_pair(&pair, cpu_online_mask); in init_hwprobe_vdso_data()
467 WARN_ON_ONCE(pair.key < 0); in init_hwprobe_vdso_data()
469 avd->all_cpu_hwprobe_values[key] = pair.value; in init_hwprobe_vdso_data()
475 id_bitsmash |= pair.value; in init_hwprobe_vdso_data()