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 <srinivas.pandruvada@linux.intel.com>
This commit is contained in:
Srinivas Pandruvada 2025-04-16 17:26:46 -07:00
parent 5aa63cab70
commit 51272ca7c3

View File

@ -26,6 +26,7 @@ static FILE *outf;
static int cpu_model;
static int cpu_stepping;
static int extended_family;
#define MAX_CPUS_IN_ONE_REQ 512
static short max_target_cpus;
@ -143,6 +144,14 @@ int is_icx_platform(void)
return 0;
}
static int is_dmr_plus_platform(void)
{
if (extended_family == 0x04)
return 1;
return 0;
}
static int update_cpu_model(void)
{
unsigned int ebx, ecx, edx;
@ -150,6 +159,7 @@ static int update_cpu_model(void)
__cpuid(1, fms, ebx, ecx, edx);
family = (fms >> 8) & 0xf;
extended_family = (fms >> 20) & 0x0f;
cpu_model = (fms >> 4) & 0xf;
if (family == 6 || family == 0xf)
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
usleep(2000);
/* Adjusting uncore freq */
isst_adjust_uncore_freq(id, tdp_level, &ctdp_level);
if (!is_dmr_plus_platform())
isst_adjust_uncore_freq(id, tdp_level, &ctdp_level);
fprintf(stderr, "Option is set to online/offline\n");
ctdp_level.core_cpumask_size =