Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7650b281b091f39f5e97f13b45ab3813b1526b65
Commit:     7650b281b091f39f5e97f13b45ab3813b1526b65
Parent:     64be7eedb2fd0d41614739b265b22708aa81734c
Author:     Venkatesh Pallipadi <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 3 12:36:30 2006 -0700
Committer:  Dave Jones <[EMAIL PROTECTED]>
CommitDate: Sun Oct 15 19:57:11 2006 -0400

    [CPUFREQ][6/8] acpi-cpufreq: Eliminate get of current freq on notification
    
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Venkatesh Pallipadi <[EMAIL PROTECTED]>
    Signed-off-by: Alexey Starikovskiy <[EMAIL PROTECTED]>
    Signed-off-by: Dave Jones <[EMAIL PROTECTED]>
---
 arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c 
b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
index 385f17a..e6513e9 100644
--- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -324,11 +324,8 @@ static int acpi_cpufreq_target(struct cpufreq_policy 
*policy,
        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 cpufreq_policy 
*policy,
        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 cpufreq_policy 
*policy)
                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_attr[] = {
 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,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to