Messages in this thread | | | Date | Mon, 27 Aug 2012 20:41:34 +0530 | From | "Naveen N. Rao" <> | Subject | Re: [PATCH 2/2] x86/mce: Honour bios-set CMCI threshold |
| |
On 08/27/2012 08:18 PM, Borislav Petkov wrote: > On Mon, Aug 27, 2012 at 04:55:12PM +0530, Naveen N. Rao wrote: >> The ACPI spec doesn't provide for a way for the bios to pass down >> recommended thresholds to the OS on a _per-bank_ basis. This patch adds >> a new boot option, which if passed, allows bios to initialize the CMCI >> threshold. In such a case, we simply skip programming any threshold >> value. >> >> As fail-safe, we initialize threshold to 1 if some banks have not been >> initialized by the bios and warn the user. >> >> Changes: >> - Use the mce_boot_flags structure. >> - Expose bios_cmci_threshold via sysfs. >> >> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> >> --- > > ... > >> @@ -119,6 +146,12 @@ static void cmci_discover(int banks, int boot) >> raw_spin_unlock_irqrestore(&cmci_discover_lock, flags); >> if (hdr) >> printk(KERN_CONT "\n"); >> + if (boot && mce_boot_flags.bios_cmci_threshold && bios_wrong_thresh) { >> + printk_once(KERN_INFO >> + "bios_cmci_threshold: Some banks do not have valid thresholds set"); >> + printk_once(KERN_INFO >> + "bios_cmci_threshold: Make sure your BIOS supports this boot option"); >> + } > > All functional changes aside, why do you want to print this at all? Does > it bring anything to the user? > > Because if BIOS is systematically b0rked and we keep issuing this every > time do do cmci_discover, then we have a lotsa users to explain to what > happens. > > Why not do a printk_once saying something along the lines of "BIOS > hasn't setup thresholds properly, correcting..." and that's it?
Yes, that's the intent here. I am using printk_once() and if I'm not mistaken, we print the above only once during boot.
I am open to changing the message if the above two lines aren't good.
Thanks! - Naveen
> > Tony? >
| |