Re: [PATCH] x86, mce, severities: Add AMD severities function

From: Borislav Petkov
Date: Fri Mar 20 2015 - 12:05:35 EST


On Fri, Mar 20, 2015 at 10:59:33AM -0500, Aravind Gopalakrishnan wrote:
> Ok, Here's how I have it currently:
> void __init mcheck_vendor_init_severity(void)
> {
> struct cpuinfo_x86 *c = &boot_cpu_data;
>
> switch (c->x86_vendor) {
> case X86_VENDOR_INTEL:
> mce_severity = mce_severity_intel;
> break;
> case X86_VENDOR_AMD:
> mce_severity = mce_severity_amd;
> break;
> default:
> break;
> }
> }
> And I call this from mcheck_init().
> I tested the above bits on AMD and the severities grading works fine.
>
> Should we also come up with a '_default' function to assign to mce_severity
> function pointer?

I think that should be

default:
WARN_ONCE("WTF?!");
break;

above.

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/