Skip to content

Commit 51272ca

Browse files
committed
tools/power/x86/intel-speed-select: Skip uncore frequency update
On SST PP level switch, skip adjusting the uncore frequency limit and allow the hardware to handle this on newer platforms. As newer generations of CPUs have changed the extended family identifier, use this identifier to exclude the update. Signed-off-by: Srinivas Pandruvada <[email protected]>
1 parent 5aa63ca commit 51272ca

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ static FILE *outf;
2626

2727
static int cpu_model;
2828
static int cpu_stepping;
29+
static int extended_family;
2930

3031
#define MAX_CPUS_IN_ONE_REQ 512
3132
static short max_target_cpus;
@@ -143,13 +144,22 @@ int is_icx_platform(void)
143144
return 0;
144145
}
145146

147+
static int is_dmr_plus_platform(void)
148+
{
149+
if (extended_family == 0x04)
150+
return 1;
151+
152+
return 0;
153+
}
154+
146155
static int update_cpu_model(void)
147156
{
148157
unsigned int ebx, ecx, edx;
149158
unsigned int fms, family;
150159

151160
__cpuid(1, fms, ebx, ecx, edx);
152161
family = (fms >> 8) & 0xf;
162+
extended_family = (fms >> 20) & 0x0f;
153163
cpu_model = (fms >> 4) & 0xf;
154164
if (family == 6 || family == 0xf)
155165
cpu_model += ((fms >> 16) & 0xf) << 4;
@@ -1517,7 +1527,8 @@ static void set_tdp_level_for_cpu(struct isst_id *id, void *arg1, void *arg2, vo
15171527
usleep(2000);
15181528

15191529
/* Adjusting uncore freq */
1520-
isst_adjust_uncore_freq(id, tdp_level, &ctdp_level);
1530+
if (!is_dmr_plus_platform())
1531+
isst_adjust_uncore_freq(id, tdp_level, &ctdp_level);
15211532

15221533
fprintf(stderr, "Option is set to online/offline\n");
15231534
ctdp_level.core_cpumask_size =

0 commit comments

Comments
 (0)