Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+12 -1
+12 -1
tools/power/x86/intel-speed-select/isst-config.c
··· 26 26 27 27 static int cpu_model; 28 28 static int cpu_stepping; 29 + static int extended_family; 29 30 30 31 #define MAX_CPUS_IN_ONE_REQ 512 31 32 static short max_target_cpus; ··· 144 143 return 0; 145 144 } 146 145 146 + static int is_dmr_plus_platform(void) 147 + { 148 + if (extended_family == 0x04) 149 + return 1; 150 + 151 + return 0; 152 + } 153 + 147 154 static int update_cpu_model(void) 148 155 { 149 156 unsigned int ebx, ecx, edx; ··· 159 150 160 151 __cpuid(1, fms, ebx, ecx, edx); 161 152 family = (fms >> 8) & 0xf; 153 + extended_family = (fms >> 20) & 0x0f; 162 154 cpu_model = (fms >> 4) & 0xf; 163 155 if (family == 6 || family == 0xf) 164 156 cpu_model += ((fms >> 16) & 0xf) << 4; ··· 1527 1517 usleep(2000); 1528 1518 1529 1519 /* Adjusting uncore freq */ 1530 - isst_adjust_uncore_freq(id, tdp_level, &ctdp_level); 1520 + if (!is_dmr_plus_platform()) 1521 + isst_adjust_uncore_freq(id, tdp_level, &ctdp_level); 1531 1522 1532 1523 fprintf(stderr, "Option is set to online/offline\n"); 1533 1524 ctdp_level.core_cpumask_size =