From: Alexey Starikovskiy <alexey_y_starikovskiy@linux.intel.com>
To: "Brown, Len" <len.brown@intel.com>, Dave Jones <davej@redhat.com>
Cc: cpufreq@lists.linux.org.uk
Subject: [PATCH 8/8] acpi-cpufreq: skip duplicate frequencies
Date: Mon, 31 Jul 2006 22:58:19 +0400 [thread overview]
Message-ID: <44CE52CB.3090104@linux.intel.com> (raw)
acpi-cpufreq.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
Skip duplicate frequencies reported by ACPI.
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy at intel.com>
Index: linux-2.6.15.1/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
===================================================================
--- linux-2.6.15.1.orig/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c 2006-07-31 21:23:47.000000000 +0400
+++ linux-2.6.15.1/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c 2006-07-31 21:36:02.000000000 +0400
@@ -22,7 +22,7 @@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
#include <linux/config.h>
@@ -476,8 +476,14 @@
} else {
data->freq_table[i].index = i;
}
- data->freq_table[i].frequency =
- perf->states[i].core_frequency * 1000;
+ if (i == 0 ||
+ perf->states[i].core_frequency !=
+ perf->states[i - 1].core_frequency) {
+ data->freq_table[i].frequency =
+ perf->states[i].core_frequency * 1000;
+ } else {
+ data->freq_table[i].frequency = CPUFREQ_ENTRY_INVALID;
+ }
}
data->freq_table[perf->state_count].frequency = CPUFREQ_TABLE_END;
next reply other threads:[~2006-07-31 18:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-31 18:58 Alexey Starikovskiy [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-08-03 21:10 [PATCH 8/8] acpi-cpufreq: skip duplicate frequencies Pallipadi, Venkatesh
2006-08-03 21:14 ` Alexey Starikovskiy
2006-08-03 21:42 Pallipadi, Venkatesh
2006-08-04 8:24 ` Alexey Starikovskiy
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=44CE52CB.3090104@linux.intel.com \
--to=alexey_y_starikovskiy@linux.intel.com \
--cc=cpufreq@lists.linux.org.uk \
--cc=davej@redhat.com \
--cc=len.brown@intel.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