Lines Matching full:pairs

6  * line interface to get the cpu list for arbitrary hwprobe pairs.
26 " of pairs. 'key' and 'value' should be in numeric form, e.g. 4=0x3b\n"); in help()
61 struct riscv_hwprobe *pairs; in do_which_cpus() local
66 pairs = malloc(nr_pairs * sizeof(struct riscv_hwprobe)); in do_which_cpus()
67 assert(pairs); in do_which_cpus()
71 pairs[i].key = strtol(start, &end, 0); in do_which_cpus()
74 pairs[i].value = strtoul(start, &end, 0); in do_which_cpus()
78 …rc = riscv_hwprobe(pairs, nr_pairs, sizeof(cpu_set_t), (unsigned long *)cpus, RISCV_HWPROBE_WHICH_… in do_which_cpus()
81 free(pairs); in do_which_cpus()
86 struct riscv_hwprobe pairs[2]; in main() local
105 pairs[0] = (struct riscv_hwprobe){ .key = RISCV_HWPROBE_KEY_BASE_BEHAVIOR, }; in main()
106 rc = riscv_hwprobe(pairs, 1, 0, NULL, 0); in main()
107 assert(rc == 0 && pairs[0].key == RISCV_HWPROBE_KEY_BASE_BEHAVIOR && in main()
108 pairs[0].value == RISCV_HWPROBE_BASE_BEHAVIOR_IMA); in main()
110 pairs[0] = (struct riscv_hwprobe){ .key = RISCV_HWPROBE_KEY_IMA_EXT_0, }; in main()
111 rc = riscv_hwprobe(pairs, 1, 0, NULL, 0); in main()
112 assert(rc == 0 && pairs[0].key == RISCV_HWPROBE_KEY_IMA_EXT_0); in main()
113 ext0_all = pairs[0].value; in main()
115pairs[0] = (struct riscv_hwprobe){ .key = RISCV_HWPROBE_KEY_BASE_BEHAVIOR, .value = RISCV_HWPROBE_… in main()
117 rc = riscv_hwprobe(pairs, 1, 0, (unsigned long *)&cpus, RISCV_HWPROBE_WHICH_CPUS); in main()
120pairs[0] = (struct riscv_hwprobe){ .key = RISCV_HWPROBE_KEY_BASE_BEHAVIOR, .value = RISCV_HWPROBE_… in main()
121 rc = riscv_hwprobe(pairs, 1, sizeof(cpu_set_t), NULL, RISCV_HWPROBE_WHICH_CPUS); in main()
124 pairs[0] = (struct riscv_hwprobe){ .key = 0xbadc0de, }; in main()
126 rc = riscv_hwprobe(pairs, 1, sizeof(cpu_set_t), (unsigned long *)&cpus, RISCV_HWPROBE_WHICH_CPUS); in main()
129pairs[0] = (struct riscv_hwprobe){ .key = RISCV_HWPROBE_KEY_BASE_BEHAVIOR, .value = RISCV_HWPROBE_… in main()
130pairs[1] = (struct riscv_hwprobe){ .key = RISCV_HWPROBE_KEY_BASE_BEHAVIOR, .value = RISCV_HWPROBE_… in main()
132 rc = riscv_hwprobe(pairs, 2, sizeof(cpu_set_t), (unsigned long *)&cpus, RISCV_HWPROBE_WHICH_CPUS); in main()
135pairs[0] = (struct riscv_hwprobe){ .key = RISCV_HWPROBE_KEY_BASE_BEHAVIOR, .value = RISCV_HWPROBE_… in main()
136 pairs[1] = (struct riscv_hwprobe){ .key = RISCV_HWPROBE_KEY_IMA_EXT_0, .value = ext0_all, }; in main()
138 rc = riscv_hwprobe(pairs, 2, sizeof(cpu_set_t), (unsigned long *)&cpus, RISCV_HWPROBE_WHICH_CPUS); in main()
141pairs[0] = (struct riscv_hwprobe){ .key = RISCV_HWPROBE_KEY_BASE_BEHAVIOR, .value = RISCV_HWPROBE_… in main()
142 pairs[1] = (struct riscv_hwprobe){ .key = RISCV_HWPROBE_KEY_IMA_EXT_0, .value = ext0_all, }; in main()
144 rc = riscv_hwprobe(pairs, 2, sizeof(cpu_set_t), (unsigned long *)&cpus, RISCV_HWPROBE_WHICH_CPUS); in main()
147pairs[0] = (struct riscv_hwprobe){ .key = RISCV_HWPROBE_KEY_BASE_BEHAVIOR, .value = RISCV_HWPROBE_… in main()
148 pairs[1] = (struct riscv_hwprobe){ .key = RISCV_HWPROBE_KEY_IMA_EXT_0, .value = ~ext0_all, }; in main()
150 rc = riscv_hwprobe(pairs, 2, sizeof(cpu_set_t), (unsigned long *)&cpus, RISCV_HWPROBE_WHICH_CPUS); in main()