mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: Borislav Petkov <bp@amd64.org>
Cc: tony.luck@intel.com, andi@firstfloor.org,
	gong.chen@linux.intel.com, ananth@in.ibm.com,
	masbock@linux.vnet.ibm.com, x86@kernel.org,
	linux-kernel@vger.kernel.org, lcm@us.ibm.com, mingo@redhat.com,
	tglx@linutronix.de, linux-edac@vger.kernel.org
Subject: Re: [PATCH 2/2] x86/mce: Honour bios-set CMCI threshold
Date: Mon, 27 Aug 2012 20:41:34 +0530	[thread overview]
Message-ID: <503B8E26.2050604@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120827144829.GF27979@aftab.osrc.amd.com>

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?
>


  reply	other threads:[~2012-08-27 15:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-27 11:25 [PATCH 1/2] x86/mce: Pack boolean MCE boot flags into a structure Naveen N. Rao
2012-08-27 11:25 ` [PATCH 2/2] x86/mce: Honour bios-set CMCI threshold Naveen N. Rao
2012-08-27 14:48   ` Borislav Petkov
2012-08-27 15:11     ` Naveen N. Rao [this message]
2012-08-27 15:21       ` Borislav Petkov
2012-08-27 13:58 ` [PATCH 1/2] x86/mce: Pack boolean MCE boot flags into a structure Andi Kleen
2012-08-27 14:18   ` Borislav Petkov
2012-08-28  6:55     ` Naveen N. Rao
2012-08-27 14:36 ` Borislav Petkov
2012-08-27 15:35   ` Naveen N. Rao
2012-08-27 15:47     ` Borislav Petkov
2012-08-27 16:01       ` Naveen N. Rao
2012-08-27 16:34         ` Borislav Petkov
2012-08-27 17:14           ` Naveen N. Rao
2012-08-27 20:18             ` Borislav Petkov
2012-08-28  7:17               ` Naveen N. Rao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=503B8E26.2050604@linux.vnet.ibm.com \
    --to=naveen.n.rao@linux.vnet.ibm.com \
    --cc=ananth@in.ibm.com \
    --cc=andi@firstfloor.org \
    --cc=bp@amd64.org \
    --cc=gong.chen@linux.intel.com \
    --cc=lcm@us.ibm.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masbock@linux.vnet.ibm.com \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome