MCE decoding on F12h
Subsystems (2)
cover MCE decoding on F12h
From: Borislav Petkov <[email protected]>
Here are 4 almost trivial patches enabling MCE
decoding on AMD F12h CPUs ontop of the stuff from
http://marc.info/?l=linux-kernel&m=128627598630356&w=2. Almost trivial because they're a subset of F10h and are reusing old functionality.
Since they're simple enough I'll add them to linux-next through
git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git for-next
and will send them to Linus sometime next week after successful simmering in linux-next for a week or so.
PATCH 1/4 EDAC, MCE: Add F12h DC MCE decoder
From: Borislav Petkov <[email protected]>
F12h DC MCE signatures are a subset of F10h's so reuse them.
--- drivers/edac/mce_amd.c | 24 +++++++++++++++++------- 1 files changed, 17 insertions(+), 7 deletions(-)
drivers/edac/mce_amd.c +17 -7
@@ -74,16 +74,10 @@ static const char *f10h_nb_mce_desc[] = { "ECC Error in the Probe Filter directory" }; -static bool f10h_dc_mce (u16 ec) +static bool f12h_dc_mce (u16 ec) { -u8 r4 = (ec >>4 ) &0xf ;bool ret = false; -if (r4 ==R4_GEN ) { -pr_cont ("during data scrub.\n" ); -return true; - } -if (MEM_ERROR (ec)) {u8 ll = ec &0x3 ; ret = true;
@@ -98,6 +92,18 @@ static bool f10h_dc_mce(u16 ec)return ret; } +static bool f10h_dc_mce (u16 ec) +{ +u8 r4 = (ec >>4 ) &0xf ; +u8 ll = ec &0x3 ; + +if (r4 ==R4_GEN && ll ==LL_L1 ) { +pr_cont ("during data scrub.\n" ); +return true; + } +return f12h_dc_mce (ec); +} +static bool k8_dc_mce (u16 ec) {if (BUS_ERROR (ec)) {
@@ -632,6 +638,10 @@ static int __init mce_amd_init(void) fam_ops->nb_mce = f10h_nb_mce;break ; +case 0x12 : + fam_ops->dc_mce = f12h_dc_mce; +break ; +case 0x14 : nb_err_cpumask =0x3 ; fam_ops->dc_mce = f14h_dc_mce;
Signature · 1 line
1.7.3.1.50.g1e633
PATCH 2/4 EDAC, MCE: Add F12h IC MCE decoder
In reply to Borislav PetkovFrom: Borislav Petkov <[email protected]>
... which is the same as for K8 and F10h.
--- drivers/edac/mce_amd.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/edac/mce_amd.c +1 -0
@@ -640,6 +640,7 @@ static int __init mce_amd_init(void)case 0x12 : fam_ops->dc_mce = f12h_dc_mce; + fam_ops->ic_mce = k8_ic_mce;break ;case 0x14 :
Signature · 1 line
1.7.3.1.50.g1e633
PATCH 3/4 EDAC, MCE: Add F12h NB MCE decoder
In reply to Borislav PetkovFrom: Borislav Petkov <[email protected]>
F12h is completely covered by the generic path.
--- drivers/edac/mce_amd.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/edac/mce_amd.c +3 -2
@@ -427,7 +427,7 @@ out:return ret; } -static bool f14h_nb_mce (u16 ec,u8 xec) +static bool nb_noop_mce (u16 ec,u8 xec) {return false; }
@@ -641,13 +641,14 @@ static int __init mce_amd_init(void)case 0x12 : fam_ops->dc_mce = f12h_dc_mce; fam_ops->ic_mce = k8_ic_mce; + fam_ops->nb_mce = nb_noop_mce;break ;case 0x14 : nb_err_cpumask =0x3 ; fam_ops->dc_mce = f14h_dc_mce; fam_ops->ic_mce = f14h_ic_mce; - fam_ops->nb_mce = f14h_nb_mce; + fam_ops->nb_mce = nb_noop_mce;break ;default :
Signature · 1 line
1.7.3.1.50.g1e633
PATCH 4/4 EDAC, MCE: Enable MCE decoding on F12h
In reply to Borislav PetkovFrom: Borislav Petkov <[email protected]>
Turn on MCE decoding on F12h.
--- drivers/edac/mce_amd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/edac/mce_amd.c +1 -1
@@ -611,7 +611,7 @@ static int __init mce_amd_init(void)if (boot_cpu_data.x86_vendor !=X86_VENDOR_AMD )return 0 ; -if ((boot_cpu_data.x86 <0xf || boot_cpu_data.x86 >0x11 ) && +if ((boot_cpu_data.x86 <0xf || boot_cpu_data.x86 >0x12 ) && (boot_cpu_data.x86 !=0x14 || boot_cpu_data.x86_model >0xf ))return 0 ;
Signature · 1 line
1.7.3.1.50.g1e633