Lines Matching refs:pair
21 static void hwprobe_arch_id(struct riscv_hwprobe *pair, in hwprobe_arch_id() argument
31 switch (pair->key) { in hwprobe_arch_id()
58 pair->value = id; in hwprobe_arch_id()
61 static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, in hwprobe_isa_ext0() argument
67 pair->value = 0; in hwprobe_isa_ext0()
69 pair->value |= RISCV_HWPROBE_IMA_FD; in hwprobe_isa_ext0()
72 pair->value |= RISCV_HWPROBE_IMA_C; in hwprobe_isa_ext0()
75 pair->value |= RISCV_HWPROBE_IMA_V; in hwprobe_isa_ext0()
87 pair->value |= RISCV_HWPROBE_EXT_##ext; \ in hwprobe_isa_ext0()
157 pair->value &= ~missing; in hwprobe_isa_ext0()
162 struct riscv_hwprobe pair; in hwprobe_ext0_has() local
164 hwprobe_isa_ext0(&pair, cpus); in hwprobe_ext0_has()
165 return (pair.value & ext); in hwprobe_ext0_has()
204 static void hwprobe_one_pair(struct riscv_hwprobe *pair, in hwprobe_one_pair() argument
207 switch (pair->key) { in hwprobe_one_pair()
211 hwprobe_arch_id(pair, cpus); in hwprobe_one_pair()
220 pair->value = RISCV_HWPROBE_BASE_BEHAVIOR_IMA; in hwprobe_one_pair()
224 hwprobe_isa_ext0(pair, cpus); in hwprobe_one_pair()
229 pair->value = hwprobe_misaligned(cpus); in hwprobe_one_pair()
233 pair->value = 0; in hwprobe_one_pair()
235 pair->value = riscv_cboz_block_size; in hwprobe_one_pair()
238 pair->value = user_max_virt_addr(); in hwprobe_one_pair()
242 pair->value = riscv_timebase; in hwprobe_one_pair()
251 pair->key = -1; in hwprobe_one_pair()
252 pair->value = 0; in hwprobe_one_pair()
296 struct riscv_hwprobe pair; in hwprobe_get_values() local
298 if (get_user(pair.key, &pairs->key)) in hwprobe_get_values()
301 pair.value = 0; in hwprobe_get_values()
302 hwprobe_one_pair(&pair, &cpus); in hwprobe_get_values()
303 ret = put_user(pair.key, &pairs->key); in hwprobe_get_values()
305 ret = put_user(pair.value, &pairs->value); in hwprobe_get_values()
345 struct riscv_hwprobe pair, tmp; in hwprobe_get_cpus() local
348 ret = copy_from_user(&pair, &pairs[i], sizeof(pair)); in hwprobe_get_cpus()
352 if (!riscv_hwprobe_key_is_valid(pair.key)) { in hwprobe_get_cpus()
354 pair = (struct riscv_hwprobe){ .key = -1, }; in hwprobe_get_cpus()
355 ret = copy_to_user(&pairs[i], &pair, sizeof(pair)); in hwprobe_get_cpus()
363 tmp = (struct riscv_hwprobe){ .key = pair.key, }; in hwprobe_get_cpus()
370 if (!riscv_hwprobe_pair_cmp(&tmp, &pair)) in hwprobe_get_cpus()
407 struct riscv_hwprobe pair; in init_hwprobe_vdso_data() local
415 pair.key = key; in init_hwprobe_vdso_data()
416 hwprobe_one_pair(&pair, cpu_online_mask); in init_hwprobe_vdso_data()
418 WARN_ON_ONCE(pair.key < 0); in init_hwprobe_vdso_data()
420 avd->all_cpu_hwprobe_values[key] = pair.value; in init_hwprobe_vdso_data()
426 id_bitsmash |= pair.value; in init_hwprobe_vdso_data()