From: Andi Kleen <andi@firstfloor.org>
To: x86@kernel.org
Cc: linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
jbeulich@novell.com, fenghua.yu@intel.com, khali@linux-fr.org
Subject: [PATCH 3/3] coretemp: Get microcode revision from cpu_data
Date: Tue, 24 May 2011 16:03:30 -0700 [thread overview]
Message-ID: <1306278210-18285-3-git-send-email-andi@firstfloor.org> (raw)
In-Reply-To: <1306278210-18285-1-git-send-email-andi@firstfloor.org>
From: Andi Kleen <ak@linux.intel.com>
Now that the ucode revision is available in cpu_data remove
the existing code in coretemp.c to query it manually. Read the ucode
revision from cpu_data instead
Cc: jbeulich@novell.com
Cc: fenghua.yu@intel.com
Cc: khali@linux-fr.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
drivers/hwmon/coretemp.c | 29 +++++------------------------
1 files changed, 5 insertions(+), 24 deletions(-)
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index 9577c43..aff3e2c 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -324,15 +324,6 @@ static int get_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *dev)
}
}
-static void __devinit get_ucode_rev_on_cpu(void *edx)
-{
- u32 eax;
-
- wrmsr(MSR_IA32_UCODE_REV, 0, 0);
- sync_core();
- rdmsr(MSR_IA32_UCODE_REV, eax, *(u32 *)edx);
-}
-
static int get_pkg_tjmax(unsigned int cpu, struct device *dev)
{
int err;
@@ -433,21 +424,11 @@ static int chk_ucode_version(struct platform_device *pdev)
* Readings might stop update when processor visited too deep sleep,
* fixed for stepping D0 (6EC).
*/
- if (c->x86_model == 0xe && c->x86_mask < 0xc) {
- /* check for microcode update */
- err = smp_call_function_single(pdev->id, get_ucode_rev_on_cpu,
- &edx, 1);
- if (err) {
- dev_err(&pdev->dev,
- "Cannot determine microcode revision of "
- "CPU#%u (%d)!\n", pdev->id, err);
- return -ENODEV;
- } else if (edx < 0x39) {
- dev_err(&pdev->dev,
- "Errata AE18 not fixed, update BIOS or "
- "microcode of the CPU!\n");
- return -ENODEV;
- }
+ if (c->x86_model == 0xe && c->x86_mask < 0xc && c->x86_cpu_update < 0x39) {
+ dev_err(&pdev->dev,
+ "Errata AE18 not fixed, update BIOS or "
+ "microcode of the CPU!\n");
+ return -ENODEV;
}
return 0;
}
--
1.7.4.4
next prev parent reply other threads:[~2011-05-24 23:04 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-24 23:03 [PATCH 1/3] x86, intel: Output microcode revision Andi Kleen
2011-05-24 23:03 ` [PATCH 2/3] x86, intel: Use cpu_update for Atom errata check Andi Kleen
2011-05-25 6:59 ` Ingo Molnar
2011-05-24 23:03 ` Andi Kleen [this message]
2011-05-24 23:58 ` [PATCH 3/3] coretemp: Get microcode revision from cpu_data Yu, Fenghua
2011-05-25 0:39 ` [PATCH 1/3] x86, intel: Output microcode revision Fenghua Yu
[not found] ` <BANLkTikoa494-bRWtbbXuE6eqLuH0ZPUTg@mail.gmail.com>
[not found] ` <493994B35A117E4F832F97C4719C4C04011E214EC2@orsmsx505.amr.corp.intel.com>
2011-05-25 0:47 ` Andi Kleen
2011-05-25 6:54 ` Ingo Molnar
2011-05-25 8:00 ` Borislav Petkov
2011-05-25 9:05 ` Ingo Molnar
2011-05-25 10:50 ` Borislav Petkov
2011-05-25 11:28 ` Ingo Molnar
2011-05-25 21:08 ` Borislav Petkov
2011-05-25 11:30 ` Ingo Molnar
2011-05-25 16:54 ` Andi Kleen
2011-05-25 18:59 ` Ingo Molnar
2011-05-25 19:13 ` Andi Kleen
2011-05-25 7:06 ` Ingo Molnar
2011-05-25 16:06 ` Henrique de Moraes Holschuh
2011-05-25 16:58 ` Andi Kleen
2011-05-25 18:24 ` Ingo Molnar
2011-05-25 19:04 ` Henrique de Moraes Holschuh
2011-05-25 19:36 ` Ingo Molnar
2011-05-25 19:05 ` Andi Kleen
2011-05-25 19:45 ` Ingo Molnar
2011-05-29 10:21 ` Jan Ceuleers
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=1306278210-18285-3-git-send-email-andi@firstfloor.org \
--to=andi@firstfloor.org \
--cc=ak@linux.intel.com \
--cc=fenghua.yu@intel.com \
--cc=jbeulich@novell.com \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox