@@ -2193,24 +2193,16 @@ static int knl_get_turbo_pstate(int cpu)
return ret;
}
-static void hybrid_get_type(void *data)
-{
- u8 *cpu_type = data;
-
- *cpu_type = get_this_hybrid_cpu_type();
-}
-
static int hwp_get_cpu_scaling(int cpu)
{
- u8 cpu_type = 0;
+ u8 cpu_type = topology_hw_cpu_type(&cpu_data(cpu));
- smp_call_function_single(cpu, hybrid_get_type, &cpu_type, 1);
/* P-cores have a smaller perf level-to-freqency scaling factor. */
- if (cpu_type == 0x40)
+ if (cpu_type == TOPO_HW_CPU_TYPE_INTEL_CORE)
return hybrid_scaling_factor;
/* Use default core scaling for E-cores */
- if (cpu_type == 0x20)
+ if (cpu_type == TOPO_HW_CPU_TYPE_INTEL_ATOM)
return core_get_scaling();
/*