From: Dominik Brodowski <linux@dominikbrodowski.de>
To: cpufreq@www.linux.org.uk, davej@codemonkey.org.uk
Cc: jeremy@goop.org
Subject: [PATCH] speedstep-centrino: ignore 0xffff'ed P-States
Date: Fri, 30 Jul 2004 17:50:05 +0200 [thread overview]
Message-ID: <20040730155005.GA7759@dominikbrodowski.de> (raw)
Some ACPI tables contain 0xffff'ed entries for "P-States". This is
obviously incorrect according to the ACPI specifications, nonetheless
it should "just work". So, simply ignore such invalid P-States instead
of aborting. Thanks to Frederik Reiss for testing (and fixing) this
patch.
Signed-off-by: Dominik Brodowski <linux@brodo.de>
diff -ruN linux-original/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c linux/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
--- linux-original/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c 2004-07-28 19:02:28.271709968 +0200
+++ linux/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c 2004-07-28 19:38:19.307702792 +0200
@@ -347,6 +347,12 @@
goto err_unreg;
}
+ if (p.states[i].core_frequency > p.states[0].core_frequency) {
+ printk(KERN_DEBUG "P%u has larger frequency than P0, skipping\n", i);
+ p.states[i].core_frequency = 0;
+ continue;
+ }
+
if (extract_clock(p.states[i].control) !=
(p.states[i].core_frequency * 1000)) {
printk(KERN_DEBUG "Invalid encoded frequency\n");
@@ -378,6 +384,8 @@
centrino_model->op_points[i].frequency = p.states[i].core_frequency * 1000;
if (cur_freq == centrino_model->op_points[i].frequency)
p.state = i;
+ if (!p.states[i].core_frequency)
+ centrino_model->op_points[i].frequency = CPUFREQ_ENTRY_INVALID;
}
centrino_model->op_points[p.state_count].frequency = CPUFREQ_TABLE_END;
reply other threads:[~2004-07-30 15:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20040730155005.GA7759@dominikbrodowski.de \
--to=linux@dominikbrodowski.de \
--cc=cpufreq@www.linux.org.uk \
--cc=davej@codemonkey.org.uk \
--cc=jeremy@goop.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.