Lines Matching full:pair

23 static void hwprobe_arch_id(struct riscv_hwprobe *pair,  in hwprobe_arch_id()  argument
33 switch (pair->key) { in hwprobe_arch_id()
60 pair->value = id; in hwprobe_arch_id()
63 static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, in hwprobe_isa_ext0() argument
69 pair->value = 0; in hwprobe_isa_ext0()
71 pair->value |= RISCV_HWPROBE_IMA_FD; in hwprobe_isa_ext0()
74 pair->value |= RISCV_HWPROBE_IMA_C; in hwprobe_isa_ext0()
77 pair->value |= RISCV_HWPROBE_IMA_V; in hwprobe_isa_ext0()
89 pair->value |= RISCV_HWPROBE_EXT_##ext; \ in hwprobe_isa_ext0()
171 pair->value &= ~missing; in hwprobe_isa_ext0()
176 struct riscv_hwprobe pair; in hwprobe_ext0_has() local
178 hwprobe_isa_ext0(&pair, cpus); in hwprobe_ext0_has()
179 return (pair.value & ext); in hwprobe_ext0_has()
255 static void hwprobe_one_pair(struct riscv_hwprobe *pair, in hwprobe_one_pair() argument
258 switch (pair->key) { in hwprobe_one_pair()
262 hwprobe_arch_id(pair, cpus); in hwprobe_one_pair()
271 pair->value = RISCV_HWPROBE_BASE_BEHAVIOR_IMA; in hwprobe_one_pair()
275 hwprobe_isa_ext0(pair, cpus); in hwprobe_one_pair()
280 pair->value = hwprobe_misaligned(cpus); in hwprobe_one_pair()
284 pair->value = hwprobe_vec_misaligned(cpus); in hwprobe_one_pair()
288 pair->value = 0; in hwprobe_one_pair()
290 pair->value = riscv_cboz_block_size; in hwprobe_one_pair()
293 pair->value = 0; in hwprobe_one_pair()
295 pair->value = riscv_cbom_block_size; in hwprobe_one_pair()
298 pair->value = user_max_virt_addr(); in hwprobe_one_pair()
302 pair->value = riscv_timebase; in hwprobe_one_pair()
306 hwprobe_isa_vendor_ext_sifive_0(pair, cpus); in hwprobe_one_pair()
310 hwprobe_isa_vendor_ext_thead_0(pair, cpus); in hwprobe_one_pair()
319 pair->key = -1; in hwprobe_one_pair()
320 pair->value = 0; in hwprobe_one_pair()
364 struct riscv_hwprobe pair; in hwprobe_get_values() local
366 if (get_user(pair.key, &pairs->key)) in hwprobe_get_values()
369 pair.value = 0; in hwprobe_get_values()
370 hwprobe_one_pair(&pair, &cpus); in hwprobe_get_values()
371 ret = put_user(pair.key, &pairs->key); in hwprobe_get_values()
373 ret = put_user(pair.value, &pairs->value); in hwprobe_get_values()
413 struct riscv_hwprobe pair, tmp; in hwprobe_get_cpus() local
416 ret = copy_from_user(&pair, &pairs[i], sizeof(pair)); in hwprobe_get_cpus()
420 if (!riscv_hwprobe_key_is_valid(pair.key)) { in hwprobe_get_cpus()
422 pair = (struct riscv_hwprobe){ .key = -1, }; in hwprobe_get_cpus()
423 ret = copy_to_user(&pairs[i], &pair, sizeof(pair)); in hwprobe_get_cpus()
431 tmp = (struct riscv_hwprobe){ .key = pair.key, }; in hwprobe_get_cpus()
438 if (!riscv_hwprobe_pair_cmp(&tmp, &pair)) in hwprobe_get_cpus()
474 struct riscv_hwprobe pair; in init_hwprobe_vdso_data() local
482 pair.key = key; in init_hwprobe_vdso_data()
483 hwprobe_one_pair(&pair, cpu_online_mask); in init_hwprobe_vdso_data()
485 WARN_ON_ONCE(pair.key < 0); in init_hwprobe_vdso_data()
487 avd->all_cpu_hwprobe_values[key] = pair.value; in init_hwprobe_vdso_data()
493 id_bitsmash |= pair.value; in init_hwprobe_vdso_data()