summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBorislav Petkov <borislav.petkov@amd.com>2010-10-01 19:44:53 +0200
committerBorislav Petkov <borislav.petkov@amd.com>2011-01-07 11:33:49 +0100
commit9f56da0e3c3269abe0b2745a54f1b082c3c14433 (patch)
treee3c5c7435e643256f9bb324f95112859761f9ba1
parent3ab0e7dc2e1d5598da609ec9a9bcd3b69b8fa654 (diff)
downloadlinux-9f56da0e3c3269abe0b2745a54f1b082c3c14433.tar.gz
linux-9f56da0e3c3269abe0b2745a54f1b082c3c14433.tar.bz2
linux-9f56da0e3c3269abe0b2745a54f1b082c3c14433.zip
amd64_edac: Use cached extended CPU model
... instead of computing it needlessly again. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
-rw-r--r--drivers/edac/amd64_edac.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 7e539ac769d7..0cbcf6e34a4c 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -1046,13 +1046,12 @@ static int k8_early_channel_count(struct amd64_pvt *pvt)
if (err)
return err;
- if ((boot_cpu_data.x86_model >> 4) >= K8_REV_F) {
+ if (pvt->ext_model >= K8_REV_F)
/* RevF (NPT) and later */
flag = pvt->dclr0 & F10_WIDTH_128;
- } else {
+ else
/* RevE and earlier */
flag = pvt->dclr0 & REVE_WIDTH_128;
- }
/* not used */
pvt->dclr1 = 0;