All of lore.kernel.org
 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 v2 1/2] mce: acpi/apei: Honour Firmware First for MCA banks listed in APEI HEST CMC
Date: Fri, 21 Jun 2013 02:52:25 +0530	[thread overview]
Message-ID: <51C37291.40303@linux.vnet.ibm.com> (raw)
In-Reply-To: <20130620205726.GA20863@pd.tnic>

On 06/21/2013 02:27 AM, Borislav Petkov wrote:
> On Fri, Jun 21, 2013 at 01:44:00AM +0530, Naveen N. Rao wrote:
>> This won't work across cpu offline/online, right? We will end up
>> _not_ enabling CMCI on certain banks where we should have.
>
> Huh, don't understand. cmci_discover runs on each CPU. After you've run
> hest_parse_cmc early during boot and cleared the mce_poll_banks bits,
> nothing will set them again so CPU hotplug doesn't matter...

Exactly, but mce_poll_banks also doesn't have bits set for banks on 
which CMCI is enabled.

Let's say we have a cpu with 2 banks (not shared), none of which work in 
FF mode. Both these banks support CMCI, so mce_poll_banks won't have 
these bits set.

On cpu offline, we call cmci_clear() which disables CMCI on these two 
banks before offlining it.  When this cpu is brought online again, we 
call cmci_discover() which sees that mce_poll_banks doesn't have these 
two banks enabled and will skip enabling CMCI thinking these are in FF.

Right?

>
>> Another thing: for hest_parse_cmc(), does the below look good?
>>
>>          cmc = (struct acpi_hest_ia_corrected *)hest_hdr;
>>          if (!cmc->enabled)
>>                  return 0;
>>
>> #define ACPI_HEST_PARSING_DONE 1
>>          /*
>>           * We expect HEST to provide a list of MC banks that
>>           * report errors in firmware first mode.
>>           */
>>          if (!(cmc->flags & ACPI_HEST_FIRMWARE_FIRST) ||
>> !cmc->num_hardware_banks)
>>                  return ACPI_HEST_PARSING_DONE;
>>
>> The return value doesn't really matter since we don't check it, but
>> returning an error looked like the wrong thing to do as well.
>
> I'd add a comment above the "return 1" statement to explain why I'm
> doing this. It is much more verbose even than a well-named macro :)

Okay :)

Thanks,
Naveen


  reply	other threads:[~2013-06-20 21:22 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19 17:57 [PATCH v2 1/2] mce: acpi/apei: Honour Firmware First for MCA banks listed in APEI HEST CMC Naveen N. Rao
2013-06-19 17:57 ` [PATCH v2 2/2] mce: acpi/apei: Add a boot option to disable ff mode for corrected errors Naveen N. Rao
2013-06-19 18:04   ` Borislav Petkov
2013-06-19 18:17     ` Naveen N. Rao
2013-06-19 18:19     ` Luck, Tony
2013-06-19 18:19       ` Luck, Tony
2013-06-19 18:36       ` Borislav Petkov
2013-06-19 19:05         ` Luck, Tony
2013-06-19 19:05           ` Luck, Tony
2013-06-19 20:14           ` Borislav Petkov
2013-06-19 20:33             ` Luck, Tony
2013-06-19 20:33               ` Luck, Tony
2013-06-19 21:07               ` Borislav Petkov
2013-06-19 21:28                 ` Luck, Tony
2013-06-19 21:28                   ` Luck, Tony
2013-06-19 21:41                   ` Borislav Petkov
2013-06-19 22:08                     ` Luck, Tony
2013-06-19 22:08                       ` Luck, Tony
2013-06-20  5:35                       ` Borislav Petkov
2013-06-20 21:21                   ` Naveen N. Rao
2013-06-20 22:11                     ` Luck, Tony
2013-06-20 22:11                       ` Luck, Tony
2013-06-21  7:27                       ` Borislav Petkov
2013-06-21 16:43                         ` Naveen N. Rao
2013-06-28 12:04                         ` Naveen N. Rao
2013-06-28 17:31                           ` Tony Luck
2013-07-01 15:07                             ` Naveen N. Rao
2013-07-01 15:38                               ` Borislav Petkov
2013-07-01 15:41                                 ` Naveen N. Rao
2013-06-20  7:48   ` Borislav Petkov
2013-06-20 19:02     ` Naveen N. Rao
2013-06-20  7:39 ` [PATCH v2 1/2] mce: acpi/apei: Honour Firmware First for MCA banks listed in APEI HEST CMC Borislav Petkov
2013-06-20  7:39   ` Borislav Petkov
2013-06-20 19:08   ` Naveen N. Rao
2013-06-20 19:29     ` Borislav Petkov
2013-06-20 20:14       ` Naveen N. Rao
2013-06-20 20:57         ` Borislav Petkov
2013-06-20 21:22           ` Naveen N. Rao [this message]
2013-06-21  7:34             ` Borislav Petkov
2013-06-21  7:46               ` Naveen N. Rao
2013-06-21  8:36                 ` Borislav Petkov
2013-06-21  9:32                   ` Naveen N. Rao
2013-06-21 14:08                     ` Borislav Petkov
2013-06-21 16:47                   ` Tony Luck
2013-06-21 17:40                     ` Borislav Petkov
2013-06-25 17:46                       ` Naveen N. Rao
2013-06-25 17:53                         ` Borislav Petkov
2013-06-25 17:55                         ` Luck, Tony
2013-06-25 17:55                           ` Luck, Tony
2013-06-25 18:28                           ` 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=51C37291.40303@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.