]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/cpufreq/intel_pstate.c
Merge branch 'pm-cpufreq'
[karo-tx-linux.git] / drivers / cpufreq / intel_pstate.c
index f1f8fbe0b4c46a2024fd552df8806f62d289a000..3d37219a0dd7afc3108b017f1d2960868efb7903 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/hrtimer.h>
 #include <linux/tick.h>
 #include <linux/slab.h>
-#include <linux/sched.h>
+#include <linux/sched/cpufreq.h>
 #include <linux/list.h>
 #include <linux/cpu.h>
 #include <linux/cpufreq.h>
 
 #define INTEL_CPUFREQ_TRANSITION_LATENCY       20000
 
-#define ATOM_RATIOS            0x66a
-#define ATOM_VIDS              0x66b
-#define ATOM_TURBO_RATIOS      0x66c
-#define ATOM_TURBO_VIDS                0x66d
-
 #ifdef CONFIG_ACPI
 #include <acpi/processor.h>
 #include <acpi/cppc_acpi.h>
@@ -1365,7 +1360,7 @@ static int atom_get_min_pstate(void)
 {
        u64 value;
 
-       rdmsrl(ATOM_RATIOS, value);
+       rdmsrl(MSR_ATOM_CORE_RATIOS, value);
        return (value >> 8) & 0x7F;
 }
 
@@ -1373,7 +1368,7 @@ static int atom_get_max_pstate(void)
 {
        u64 value;
 
-       rdmsrl(ATOM_RATIOS, value);
+       rdmsrl(MSR_ATOM_CORE_RATIOS, value);
        return (value >> 16) & 0x7F;
 }
 
@@ -1381,7 +1376,7 @@ static int atom_get_turbo_pstate(void)
 {
        u64 value;
 
-       rdmsrl(ATOM_TURBO_RATIOS, value);
+       rdmsrl(MSR_ATOM_CORE_TURBO_RATIOS, value);
        return value & 0x7F;
 }
 
@@ -1443,7 +1438,7 @@ static void atom_get_vid(struct cpudata *cpudata)
 {
        u64 value;
 
-       rdmsrl(ATOM_VIDS, value);
+       rdmsrl(MSR_ATOM_CORE_VIDS, value);
        cpudata->vid.min = int_tofp((value >> 8) & 0x7f);
        cpudata->vid.max = int_tofp((value >> 16) & 0x7f);
        cpudata->vid.ratio = div_fp(
@@ -1451,7 +1446,7 @@ static void atom_get_vid(struct cpudata *cpudata)
                int_tofp(cpudata->pstate.max_pstate -
                        cpudata->pstate.min_pstate));
 
-       rdmsrl(ATOM_TURBO_VIDS, value);
+       rdmsrl(MSR_ATOM_CORE_TURBO_VIDS, value);
        cpudata->vid.turbo = value & 0x7f;
 }