tools/power/x86/intel-speed-select: Increase number of CPUs displayed
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Mon, 25 Mar 2024 20:39:36 +0000 (13:39 -0700)
committerHans de Goede <hdegoede@redhat.com>
Mon, 29 Apr 2024 11:31:50 +0000 (13:31 +0200)
Currently max 128 CPUs can be displayed in the enable CPU list. Double
the range. Since the size is big for stack allocation, change to static.
Here changing to static is fine as these functions are called in serial.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
tools/power/x86/intel-speed-select/isst-display.c

index 14c9b037859ac13355fb59bb2e8a450bf613d64a..e30f6355e417ebd117e2d3b118f21e7e76d1f68a 100644 (file)
@@ -199,8 +199,8 @@ static void _isst_pbf_display_information(struct isst_id *id, FILE *outf, int le
                                          struct isst_pbf_info *pbf_info,
                                          int disp_level)
 {
-       char header[256];
-       char value[512];
+       static char header[256];
+       static char value[1024];
 
        snprintf(header, sizeof(header), "speed-select-base-freq-properties");
        format_and_print(outf, disp_level, header, NULL);
@@ -338,8 +338,8 @@ void isst_ctdp_display_core_info(struct isst_id *id, FILE *outf, char *prefix,
 void isst_ctdp_display_information(struct isst_id *id, FILE *outf, int tdp_level,
                                   struct isst_pkg_ctdp *pkg_dev)
 {
-       char header[256];
-       char value[512];
+       static char header[256];
+       static char value[1024];
        static int level;
        int trl_max_levels = isst_get_trl_max_levels();
        int i;