diff options
author | Thomas Renninger <trenn@suse.de> | 2011-07-21 11:54:54 +0200 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2011-07-29 19:37:27 +0200 |
commit | 029e9f73667f9b4661ac9886f706d75d26850260 (patch) | |
tree | 4dd812e1de53d07695ce9b889482b032471a6889 /tools/power/cpupower/utils/helpers/msr.c | |
parent | 8fb2e440b223b966f74a04a48f6f71f288fa671b (diff) | |
download | op-kernel-dev-029e9f73667f9b4661ac9886f706d75d26850260.zip op-kernel-dev-029e9f73667f9b4661ac9886f706d75d26850260.tar.gz |
cpupower: Do detect IDA (opportunistic processor performance) via cpuid
IA32-Intel Devel guide Volume 3A - 14.3.2.1
-------------------------------------------
...
Opportunistic processor performance operation can be disabled by setting bit 38 of
IA32_MISC_ENABLES. This mechanism is intended for BIOS only. If
IA32_MISC_ENABLES[38] is set, CPUID.06H:EAX[1] will return 0.
Better detect things via cpuid, this cleans up the code a bit
and the MSR parts were not working correctly anyway.
Signed-off-by: Thomas Renninger <trenn@suse.de>
CC: lenb@kernel.org
CC: linux@dominikbrodowski.net
CC: cpufreq@vger.kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'tools/power/cpupower/utils/helpers/msr.c')
-rw-r--r-- | tools/power/cpupower/utils/helpers/msr.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/tools/power/cpupower/utils/helpers/msr.c b/tools/power/cpupower/utils/helpers/msr.c index 7869ca6..31a4b24 100644 --- a/tools/power/cpupower/utils/helpers/msr.c +++ b/tools/power/cpupower/utils/helpers/msr.c @@ -72,29 +72,6 @@ int write_msr(int cpu, unsigned int idx, unsigned long long val) return -1; } -int msr_intel_has_boost_support(unsigned int cpu) -{ - unsigned long long misc_enables; - int ret; - - ret = read_msr(cpu, MSR_IA32_MISC_ENABLES, &misc_enables); - if (ret) - return ret; - - return (misc_enables >> 38) & 0x1; -} - -int msr_intel_boost_is_active(unsigned int cpu) -{ - unsigned long long perf_status; - int ret; - - ret = read_msr(cpu, MSR_IA32_PERF_STATUS, &perf_status); - if (ret) - return ret; - return (perf_status >> 32) & 0x1; -} - int msr_intel_get_perf_bias(unsigned int cpu) { unsigned long long val; |