[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <550C43E5.4090302@amd.com>
Date: Fri, 20 Mar 2015 10:59:33 -0500
From: Aravind Gopalakrishnan <aravind.gopalakrishnan@....com>
To: "Luck, Tony" <tony.luck@...el.com>, Borislav Petkov <bp@...en8.de>
CC: "tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"hpa@...or.com" <hpa@...or.com>,
"slaoub@...il.com" <slaoub@...il.com>,
"luto@...capital.net" <luto@...capital.net>,
"x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>
Subject: Re: [PATCH] x86, mce, severities: Add AMD severities function
On 3/19/2015 12:15 PM, Luck, Tony wrote:
>>> It would be best if what Tony suggested comes ontop of your patch with
>>> his Suggested-by: tag. This ordering should be also the easiest wrt
>>> functionality and bisectability.
>>>
>>>
>> Ok, I'll have it ready and send out a V2 by tomorrow if there are no
>> other comments/reviews.
> Fame & glory ... whatever. Just be sure to make the _intel() and _amd()
> severity functions "static" ... so you'll need something like this in mce-severity.c
>
> void mce_vendor_severity_init(void)
> {
> .... assign mce_severity here
> }
>
>
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?
Something like-
static int mce_severity_default(struct mce *m, int tolerant,
char **msg, bool is_excp)
{
pr_err("CPU#%d: No vendor specific severities grader assigned.
Implementing default grader\n", smp_processor_id());
if (m->status & MCI_STATUS_PCC || m->status & MCI_STATUS_OVER)
return MCE_PANIC_SEVERITY;
if (m->status & MCI_STATUS_UC)
return MCE_UC_SEVERITY;
return MCE_KEEP_SEVERITY;
}
int (*mce_severity) (struct mce *m, int tolerant, char **msg, bool
is_excp) =
mce_severity_default;
How much of grading should '_default' do if at all?
Thanks,
-Aravind.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists