From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
To: Dave Jones <davej@redhat.com>
Cc: cpufreq <cpufreq@www.linux.org.uk>
Subject: [PATCH 6/8]cpufreq:acpi-cpufreq: Eliminate get of current freq on notification
Date: Tue, 3 Oct 2006 12:36:30 -0700 [thread overview]
Message-ID: <20061003123630.D31827@unix-os.sc.intel.com> (raw)
Only change the frequency if the state previously set is different
from what we are trying to set. We don't really have to get the current
frequency at this point.
Signed-off-by: Denis Sadykov <denis.m.sadykov@intel.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Index: linux-2.6.18/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
===================================================================
--- linux-2.6.18.orig/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ linux-2.6.18/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -324,11 +324,8 @@ static int acpi_cpufreq_target(struct cp
online_policy_cpus = policy->cpus;
#endif
- cmd.val = get_cur_val(online_policy_cpus);
- freqs.old = extract_freq(cmd.val, data);
- freqs.new = data->freq_table[next_state].frequency;
next_perf_state = data->freq_table[next_state].index;
- if (freqs.new == freqs.old) {
+ if (perf->state == next_perf_state) {
if (unlikely(data->resume)) {
dprintk("Called after resume, resetting to P%d\n",
next_perf_state);
@@ -366,6 +363,8 @@ static int acpi_cpufreq_target(struct cp
else
cpu_set(policy->cpu, cmd.mask);
+ freqs.old = data->freq_table[perf->state].frequency;
+ freqs.new = data->freq_table[next_perf_state].frequency;
for_each_cpu_mask(i, cmd.mask) {
freqs.cpu = i;
cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
@@ -613,6 +612,7 @@ static int acpi_cpufreq_cpu_init(struct
policy->cur = acpi_cpufreq_guess_freq(data, policy->cpu);
break;
case ACPI_ADR_SPACE_FIXED_HARDWARE:
+ acpi_cpufreq_driver.get = get_cur_freq_on_cpu;
get_cur_freq_on_cpu(cpu);
break;
default:
@@ -687,7 +687,6 @@ static struct freq_attr *acpi_cpufreq_at
static struct cpufreq_driver acpi_cpufreq_driver = {
.verify = acpi_cpufreq_verify,
.target = acpi_cpufreq_target,
- .get = get_cur_freq_on_cpu,
.init = acpi_cpufreq_cpu_init,
.exit = acpi_cpufreq_cpu_exit,
.resume = acpi_cpufreq_resume,
next reply other threads:[~2006-10-03 19:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-03 19:36 Venkatesh Pallipadi [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-10-02 23:16 [PATCH 6/8]cpufreq: acpi-cpufreq: Eliminate get of current freq on notification Pallipadi, Venkatesh
2006-10-02 23:20 ` Dominik Brodowski
2006-10-01 14:15 Venkatesh Pallipadi
2006-10-02 0:51 ` Dominik Brodowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061003123630.D31827@unix-os.sc.intel.com \
--to=venkatesh.pallipadi@intel.com \
--cc=cpufreq@www.linux.org.uk \
--cc=davej@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox