|
@@ -34,8 +34,10 @@
|
|
|
|
|
|
#define SAMPLE_COUNT 3
|
|
#define SAMPLE_COUNT 3
|
|
|
|
|
|
-#define BYT_RATIOS 0x66a
|
|
|
|
-#define BYT_VIDS 0x66b
|
|
|
|
|
|
+#define BYT_RATIOS 0x66a
|
|
|
|
+#define BYT_VIDS 0x66b
|
|
|
|
+#define BYT_TURBO_RATIOS 0x66c
|
|
|
|
+
|
|
|
|
|
|
#define FRAC_BITS 8
|
|
#define FRAC_BITS 8
|
|
#define int_tofp(X) ((int64_t)(X) << FRAC_BITS)
|
|
#define int_tofp(X) ((int64_t)(X) << FRAC_BITS)
|
|
@@ -367,6 +369,13 @@ static int byt_get_max_pstate(void)
|
|
return (value >> 16) & 0xFF;
|
|
return (value >> 16) & 0xFF;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static int byt_get_turbo_pstate(void)
|
|
|
|
+{
|
|
|
|
+ u64 value;
|
|
|
|
+ rdmsrl(BYT_TURBO_RATIOS, value);
|
|
|
|
+ return value & 0x3F;
|
|
|
|
+}
|
|
|
|
+
|
|
static void byt_set_pstate(struct cpudata *cpudata, int pstate)
|
|
static void byt_set_pstate(struct cpudata *cpudata, int pstate)
|
|
{
|
|
{
|
|
u64 val;
|
|
u64 val;
|
|
@@ -469,7 +478,7 @@ static struct cpu_defaults byt_params = {
|
|
.funcs = {
|
|
.funcs = {
|
|
.get_max = byt_get_max_pstate,
|
|
.get_max = byt_get_max_pstate,
|
|
.get_min = byt_get_min_pstate,
|
|
.get_min = byt_get_min_pstate,
|
|
- .get_turbo = byt_get_max_pstate,
|
|
|
|
|
|
+ .get_turbo = byt_get_turbo_pstate,
|
|
.set = byt_set_pstate,
|
|
.set = byt_set_pstate,
|
|
.get_vid = byt_get_vid,
|
|
.get_vid = byt_get_vid,
|
|
},
|
|
},
|