diff options
author | Mattia Dongili <malattia@linux.it> | 2005-12-02 15:59:41 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2005-12-06 22:27:15 -0500 |
commit | 1a10760c91c394dfe4adfefeeaf85cd8098c4894 (patch) | |
tree | 80e6bfa8c8c247843bfbc90b9809ffafda1841f8 /arch/i386/kernel/cpu/cpufreq/speedstep-ich.c | |
parent | fc457fa7c0cdbfe96812ba377e508880d600298f (diff) |
[CPUFREQ] Measure transition latency at driver initialization
The attached patch introduces runtime latency measurement for ICH[234]
based chipsets instead of using CPUFREQ_ETERNAL. It includes
some sanity checks in case the measured value is out of range and
assigns a safe value of 500uSec that should still be enough on
problematics chipsets (current testing report values ~200uSec). The
measurement is currently done in speedstep_get_freqs in order to avoid
further unnecessary transitions and in the hope it'll come handy for SMI
also.
Signed-off-by: Mattia Dongili <malattia@linux.it>
Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Dave Jones <davej@redhat.com>
speedstep-ich.c | 4 ++--
speedstep-lib.c | 32 +++++++++++++++++++++++++++++++-
speedstep-lib.h | 1 +
speedstep-smi.c | 1 +
4 files changed, 35 insertions(+), 3 deletions(-)
Diffstat (limited to 'arch/i386/kernel/cpu/cpufreq/speedstep-ich.c')
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/speedstep-ich.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c b/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c index 5b7d18a06afa..862e0b5656b9 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c | |||
@@ -315,10 +315,11 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) | |||
315 | cpus_allowed = current->cpus_allowed; | 315 | cpus_allowed = current->cpus_allowed; |
316 | set_cpus_allowed(current, policy->cpus); | 316 | set_cpus_allowed(current, policy->cpus); |
317 | 317 | ||
318 | /* detect low and high frequency */ | 318 | /* detect low and high frequency and transition latency */ |
319 | result = speedstep_get_freqs(speedstep_processor, | 319 | result = speedstep_get_freqs(speedstep_processor, |
320 | &speedstep_freqs[SPEEDSTEP_LOW].frequency, | 320 | &speedstep_freqs[SPEEDSTEP_LOW].frequency, |
321 | &speedstep_freqs[SPEEDSTEP_HIGH].frequency, | 321 | &speedstep_freqs[SPEEDSTEP_HIGH].frequency, |
322 | &policy->cpuinfo.transition_latency, | ||
322 | &speedstep_set_state); | 323 | &speedstep_set_state); |
323 | set_cpus_allowed(current, cpus_allowed); | 324 | set_cpus_allowed(current, cpus_allowed); |
324 | if (result) | 325 | if (result) |
@@ -335,7 +336,6 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) | |||
335 | 336 | ||
336 | /* cpuinfo and default policy values */ | 337 | /* cpuinfo and default policy values */ |
337 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | 338 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; |
338 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; | ||
339 | policy->cur = speed; | 339 | policy->cur = speed; |
340 | 340 | ||
341 | result = cpufreq_frequency_table_cpuinfo(policy, speedstep_freqs); | 341 | result = cpufreq_frequency_table_cpuinfo(policy, speedstep_freqs); |