Skip to content

Commit fcf1278

Browse files
committed
tools/power/x86/intel-speed-select: Fix json formatting issue
Fix two issues related to JSON formatting: 1. intel-speed-select -f json -o cp.out -c 1 core-power assoc -c 1 Intel(R) Speed Select Technology Executing on CPU model:143[0x8f] [root@spr-bkc bin]# cat cp.out | jq . "package-0:die-0:cpu-1" 2. intel-speed-select -f json -o tf.out turbo-freq enable -a Intel(R) Speed Select Technology Executing on CPU model:143[0x8f] [root@spr-bkc bin]# cat tf.out | jq . { "package-0:die-0:cpu-0": { "turbo-freq": { "enable": "success" } }, "package-1:die-0:cpu-48": { "turbo-freq": { "enable": "success" } } } "turbo-freq --auto" parse error: Expected string key before ':' at line 17, column 24 Both of these issues needed proper closing "}" for JSON. Signed-off-by: Srinivas Pandruvada <[email protected]>
1 parent 4ebde55 commit fcf1278

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tools/power/x86/intel-speed-select/isst-config.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2113,7 +2113,6 @@ static void set_fact_enable(int arg)
21132113
else
21142114
for_each_online_power_domain_in_set(set_fact_for_cpu, NULL, NULL,
21152115
NULL, &enable);
2116-
isst_ctdp_display_information_end(outf);
21172116

21182117
if (!fact_enable_fail && enable && auto_mode) {
21192118
/*
@@ -2192,10 +2191,13 @@ static void set_fact_enable(int arg)
21922191
isst_display_result(&id, outf, "turbo-freq --auto", "enable", 0);
21932192
}
21942193

2194+
isst_ctdp_display_information_end(outf);
2195+
21952196
return;
21962197

21972198
error_disp:
21982199
isst_display_result(&id, outf, "turbo-freq --auto", "enable", ret);
2200+
isst_ctdp_display_information_end(outf);
21992201

22002202
}
22012203

@@ -2434,12 +2436,16 @@ static void set_clos_assoc(int arg)
24342436
isst_display_error_info_message(1, "Invalid clos id\n", 0, 0);
24352437
exit(0);
24362438
}
2439+
2440+
isst_ctdp_display_information_start(outf);
2441+
24372442
if (max_target_cpus)
24382443
for_each_online_target_cpu_in_set(set_clos_assoc_for_cpu, NULL,
24392444
NULL, NULL, NULL);
24402445
else {
24412446
isst_display_error_info_message(1, "Invalid target cpu. Specify with [-c|--cpu]", 0, 0);
24422447
}
2448+
isst_ctdp_display_information_end(outf);
24432449
}
24442450

24452451
static void get_clos_assoc_for_cpu(struct isst_id *id, void *arg1, void *arg2, void *arg3,

0 commit comments

Comments
 (0)