Commit 51272ca7 authored by Srinivas Pandruvada's avatar Srinivas Pandruvada
Browse files

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: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
parent 5aa63cab
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -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,6 +1527,7 @@ static void set_tdp_level_for_cpu(struct isst_id *id, void *arg1, void *arg2, vo
		usleep(2000);

		/* Adjusting uncore freq */
		if (!is_dmr_plus_platform())
			isst_adjust_uncore_freq(id, tdp_level, &ctdp_level);

		fprintf(stderr, "Option is set to online/offline\n");