Lines Matching +full:key +full:- +full:value
1 // SPDX-License-Identifier: GPL-2.0-only
22 "which-cpus: [-h] [<key=value> [<key=value> ...]]\n\n" in help()
25 " <key=value>, outputs the cpulist for cpus which all match the given set\n" in help()
26 " of pairs. 'key' and 'value' should be in numeric form, e.g. 4=0x3b\n"); in help()
41 printf("-%d", end); in print_cpulist()
55 printf("-%d", end); in print_cpulist()
62 int nr_pairs = argc - 1; 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()
95 if (!strcmp(argv[1], "-h")) in main()
105 pairs[0] = (struct riscv_hwprobe){ .key = RISCV_HWPROBE_KEY_BASE_BEHAVIOR, }; 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()
112 assert(rc == 0 && pairs[0].key == RISCV_HWPROBE_KEY_IMA_EXT_0); in main()
113 ext0_all = pairs[0].value; in main()
115 …pairs[0] = (struct riscv_hwprobe){ .key = RISCV_HWPROBE_KEY_BASE_BEHAVIOR, .value = RISCV_HWPROBE_… in main()
118 ksft_test_result(rc == -EINVAL, "no cpusetsize\n"); in main()
120 …pairs[0] = (struct riscv_hwprobe){ .key = RISCV_HWPROBE_KEY_BASE_BEHAVIOR, .value = RISCV_HWPROBE_… in main()
122 ksft_test_result(rc == -EINVAL, "NULL cpus\n"); in main()
124 pairs[0] = (struct riscv_hwprobe){ .key = 0xbadc0de, }; in main()
127 ksft_test_result(rc == 0 && CPU_COUNT(&cpus) == 0, "unknown key\n"); in main()
129 …pairs[0] = (struct riscv_hwprobe){ .key = RISCV_HWPROBE_KEY_BASE_BEHAVIOR, .value = RISCV_HWPROBE_… in main()
130 …pairs[1] = (struct riscv_hwprobe){ .key = RISCV_HWPROBE_KEY_BASE_BEHAVIOR, .value = RISCV_HWPROBE_… in main()
135 …pairs[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()
141 …pairs[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()
147 …pairs[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()