[tip:ras/core] x86/mce: Add the missing memory error check on AMD
Commit-ID: db548a28fcee0f38cf4c7c726becf24c8afacf02 Gitweb: http://git.kernel.org/tip/db548a28fcee0f38cf4c7c726becf24c8afacf02 Author: Borislav Petkov AuthorDate: Tue, 24 Nov 2015 08:41:19 +0100 Committer: Ingo Molnar CommitDate: Tue, 24 Nov 2015 09:12:35 +0100 x86/mce: Add the missing memory error check on AMD We simply need to look at the extended error code when detecting whether the error is of type memory. Signed-off-by: Borislav Petkov Acked-by: Tony Luck Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1448350880-5573-4-git-send-email...@alien8.de Signed-off-by: Ingo Molnar --- arch/x86/kernel/cpu/mcheck/mce.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index fb8b1db..e00e85a 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -522,10 +522,10 @@ static bool memory_error(struct mce *m) struct cpuinfo_x86 *c = _cpu_data; if (c->x86_vendor == X86_VENDOR_AMD) { - /* -* coming soon -*/ - return false; + /* ErrCodeExt[20:16] */ + u8 xec = (m->status >> 16) & 0x1f; + + return (xec == 0x0 || xec == 0x8); } else if (c->x86_vendor == X86_VENDOR_INTEL) { /* * Intel SDM Volume 3B - 15.9.2 Compound Error Codes -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[tip:ras/core] x86/mce: Add the missing memory error check on AMD
Commit-ID: db548a28fcee0f38cf4c7c726becf24c8afacf02 Gitweb: http://git.kernel.org/tip/db548a28fcee0f38cf4c7c726becf24c8afacf02 Author: Borislav PetkovAuthorDate: Tue, 24 Nov 2015 08:41:19 +0100 Committer: Ingo Molnar CommitDate: Tue, 24 Nov 2015 09:12:35 +0100 x86/mce: Add the missing memory error check on AMD We simply need to look at the extended error code when detecting whether the error is of type memory. Signed-off-by: Borislav Petkov Acked-by: Tony Luck Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1448350880-5573-4-git-send-email...@alien8.de Signed-off-by: Ingo Molnar --- arch/x86/kernel/cpu/mcheck/mce.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index fb8b1db..e00e85a 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -522,10 +522,10 @@ static bool memory_error(struct mce *m) struct cpuinfo_x86 *c = _cpu_data; if (c->x86_vendor == X86_VENDOR_AMD) { - /* -* coming soon -*/ - return false; + /* ErrCodeExt[20:16] */ + u8 xec = (m->status >> 16) & 0x1f; + + return (xec == 0x0 || xec == 0x8); } else if (c->x86_vendor == X86_VENDOR_INTEL) { /* * Intel SDM Volume 3B - 15.9.2 Compound Error Codes -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/