Commit 0344b7bf authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[CPUFREQ] Add longrun ->get

Longrun users might be interested in their CPU's current frequency as
well, so use a longrun-specific cpuid-call in longrun_get().
parent 573cb858
......@@ -128,6 +128,17 @@ static int longrun_verify_policy(struct cpufreq_policy *policy)
return 0;
}
static unsigned int longrun_get(unsigned int cpu)
{
u32 eax, ebx, ecx, edx;
if (cpu)
return 0;
cpuid(0x80860007, &eax, &ebx, &ecx, &edx);
return (eax * 1000);
}
/**
* longrun_determine_freqs - determines the lowest and highest possible core frequency
......@@ -250,8 +261,10 @@ static int __init longrun_cpu_init(struct cpufreq_policy *policy)
static struct cpufreq_driver longrun_driver = {
.flags = CPUFREQ_CONST_LOOPS,
.verify = longrun_verify_policy,
.setpolicy = longrun_set_policy,
.get = longrun_get,
.init = longrun_cpu_init,
.name = "longrun",
.owner = THIS_MODULE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment