mirror of https://gitee.com/openkylin/linux.git
amd64_edac: Use cached extended CPU model
... instead of computing it needlessly again. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
This commit is contained in:
parent
3ab0e7dc2e
commit
9f56da0e3c
|
@ -1046,13 +1046,12 @@ static int k8_early_channel_count(struct amd64_pvt *pvt)
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
if ((boot_cpu_data.x86_model >> 4) >= K8_REV_F) {
|
if (pvt->ext_model >= K8_REV_F)
|
||||||
/* RevF (NPT) and later */
|
/* RevF (NPT) and later */
|
||||||
flag = pvt->dclr0 & F10_WIDTH_128;
|
flag = pvt->dclr0 & F10_WIDTH_128;
|
||||||
} else {
|
else
|
||||||
/* RevE and earlier */
|
/* RevE and earlier */
|
||||||
flag = pvt->dclr0 & REVE_WIDTH_128;
|
flag = pvt->dclr0 & REVE_WIDTH_128;
|
||||||
}
|
|
||||||
|
|
||||||
/* not used */
|
/* not used */
|
||||||
pvt->dclr1 = 0;
|
pvt->dclr1 = 0;
|
||||||
|
|
Loading…
Reference in New Issue