]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
amd64_edac: Use cached extended CPU model
authorBorislav Petkov <borislav.petkov@amd.com>
Fri, 1 Oct 2010 17:44:53 +0000 (19:44 +0200)
committerBorislav Petkov <borislav.petkov@amd.com>
Fri, 7 Jan 2011 10:33:49 +0000 (11:33 +0100)
... instead of computing it needlessly again.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
drivers/edac/amd64_edac.c

index 7e539ac769d794396b9f6d0a96d9d7d9f2a82a21..0cbcf6e34a4c94918343e2a6897ee62762190c30 100644 (file)
@@ -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;