linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: Borislav Petkov <bp@alien8.de>
Cc: tony.luck@intel.com, ananth@in.ibm.com,
	masbock@linux.vnet.ibm.com, lcm@linux.vnet.ibm.com,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	ying.huang@intel.com
Subject: Re: [PATCH] Re: [Patch] MCE, APEI: Don't enable CMCI when Firmware First mode is set in
Date: Mon, 17 Jun 2013 12:30:44 +0530	[thread overview]
Message-ID: <51BEB41C.2000808@linux.vnet.ibm.com> (raw)
In-Reply-To: <20130616122030.GA12290@nazgul.tnic>

On 06/16/2013 05:50 PM, Borislav Petkov wrote:
> On Fri, Jun 14, 2013 at 11:47:21PM +0530, Naveen N. Rao wrote:
>> +static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data)
>> +{
>> +	int i;
>> +	struct acpi_hest_ia_corrected *cmc;
>> +	struct acpi_hest_ia_error_bank *mc_bank;
>> +
>> +	if (hest_hdr->type != ACPI_HEST_TYPE_IA32_CORRECTED_CHECK)
>> +		return 0;
>> +
>> +	if (!((struct acpi_hest_generic *)hest_hdr)->enabled)
>> +		return 0;
>> +
>> +	cmc = (struct acpi_hest_ia_corrected *)hest_hdr;
>> +	if (!(cmc->flags & ACPI_HEST_FIRMWARE_FIRST))
>> +		return 0;
>> +
>> +	/*
>> +	 * We expect HEST to provide a list of MC banks that
>> +	 * report errors through firmware first mode.
>> +	 */
>> +	if (cmc->num_hardware_banks <= 0)
>> +		return 0;
>> +
>> +	pr_info("HEST: Enabling Firmware First mode for corrected errors\n");
>> +
>> +	mc_bank = (struct acpi_hest_ia_error_bank *)(cmc + 1);
>> +	for (i = 0; i < cmc->num_hardware_banks; i++, mc_bank++)
>> +		mce_disable_bank(mc_bank->bank_number);
>
> One more thing: we never trust the BIOS so mce_disable_bank() should
> sanity-check this mc_bank->bank_number against the number of the
> actually available banks on the system before disabling anything.

Agreed. Will add the check.

>
> Thanks.
>

Thanks,
Naveen


      reply	other threads:[~2013-06-17  7:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1367881102.4518.68.camel@oc3432500282.ibm.com>
     [not found] ` <20130506232537.GF22041@pd.tnic>
     [not found]   ` <1367897566.4518.83.camel@oc3432500282.ibm.com>
     [not found]     ` <20130507131946.GC7633@pd.tnic>
     [not found]       ` <1367941214.4518.90.camel@oc3432500282.ibm.com>
     [not found]         ` <20130508212237.GI30955@pd.tnic>
     [not found]           ` <3908561D78D1C84285E8C5FCA982C28F2DA47E5E@ORSMSX101.amr.corp.intel.com>
     [not found]             ` <20130508221501.GK30955@pd.tnic>
     [not found]               ` <3908561D78D1C84285E8C5FCA982C28F2DA47F03@ORSMSX101.amr.corp.intel.com>
     [not found]                 ` <1368208744.4518.182.camel@oc3432500282.ibm.com>
2013-05-12 14:47                   ` [Patch] MCE, APEI: Don't enable CMCI when Firmware First mode is set in HEST for corrected machine checks Borislav Petkov
2013-06-14 18:17                 ` [PATCH] Re: [Patch] MCE, APEI: Don't enable CMCI when Firmware First mode is set in Naveen N. Rao
2013-06-15 14:48                   ` Borislav Petkov
2013-06-17  7:00                     ` Naveen N. Rao
2013-06-17  7:06                       ` Borislav Petkov
2013-06-17  8:11                         ` Naveen N. Rao
2013-06-17  8:21                           ` Borislav Petkov
2013-06-17 10:31                             ` Naveen N. Rao
2013-06-18  6:43                             ` Naveen N. Rao
2013-06-18 22:29                               ` Tony Luck
2013-06-19  6:58                                 ` Naveen N. Rao
2013-06-16 12:20                   ` Borislav Petkov
2013-06-17  7:00                     ` Naveen N. Rao [this message]

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=51BEB41C.2000808@linux.vnet.ibm.com \
    --to=naveen.n.rao@linux.vnet.ibm.com \
    --cc=ananth@in.ibm.com \
    --cc=bp@alien8.de \
    --cc=lcm@linux.vnet.ibm.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masbock@linux.vnet.ibm.com \
    --cc=tony.luck@intel.com \
    --cc=ying.huang@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).