public inbox for linux-kernel@vger.kernel.org
 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 <tony.luck@intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Borislav Petkov <borislav.petkov@amd.com>
Subject: Re: [RFC PATCH 3/3] Convert mce_disabled
Date: Mon, 15 Oct 2012 11:23:41 +0530	[thread overview]
Message-ID: <507BA4E5.7020608@linux.vnet.ibm.com> (raw)
In-Reply-To: <20121012115628.GA14991@aftab.osrc.amd.com>

On 10/12/2012 05:26 PM, Borislav Petkov wrote:
> On Fri, Oct 12, 2012 at 04:20:40PM +0530, Naveen N. Rao wrote:
>> Hi Boris, Thanks for getting to this before I could!
>
> Ah ok, I thought you wasn't interested in doing this anymore :).

Sorry - just got sidetracked a bit, I'm afraid :)

>
>> I had a look but I still feel boolean is a better way to go. With
>> bool, we can get rid of the #defines above and more importantly, the
>> aux field in dev_ext_attribute since that is used in other places
>> too. Further, I suspect we'll still end up using the same or less
>> memory since we don't have that many boolean members within the MCA
>> code.
>
> My main intention was to have all those in a single struct and use a
> single store_bit/show_bit function.
>
> Sure, you can do bools but this'll still be single variables spread
> around in mce.c instead of one single struct mca_config which nicely
> encapsulates all the configuration we do in the MCA code.
>
> Or, you can modify the mca_config I have there and use bools and pass a
> pointer to each actual bool member in each DEVICE_BIT_ATTR invocation
> (and rename it to DEVICE_BOOL_ATTR). Yeah, that could work, unless I'm
> missing something else, of course.

Yes, this is what I had in mind. Though your code for use of bitfield is 
nicely done, I felt use of boolean will fit better in this specific case.


Thanks,
Naveen


  parent reply	other threads:[~2012-10-15  5:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-10 14:19 [RFC PATCH 0/3] mca_config stuff Borislav Petkov
2012-10-10 14:19 ` [RFC PATCH 1/3] Add DEVICE_BIT_ATTR Borislav Petkov
2012-10-10 14:20 ` [RFC PATCH 2/3] Change mce_dont_log_ce Borislav Petkov
2012-10-10 14:20 ` [RFC PATCH 3/3] Convert mce_disabled Borislav Petkov
2012-10-10 15:46   ` Luck, Tony
2012-10-10 15:53     ` Borislav Petkov
2012-10-12 10:50   ` Naveen N. Rao
2012-10-12 11:56     ` Borislav Petkov
2012-10-12 17:46       ` Luck, Tony
2012-10-12 21:58         ` Borislav Petkov
2012-10-15  5:53       ` Naveen N. Rao [this message]
2012-10-10 15:35 ` [RFC PATCH 0/3] mca_config stuff Luck, Tony
2012-10-10 19:53   ` Borislav Petkov

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=507BA4E5.7020608@linux.vnet.ibm.com \
    --to=naveen.n.rao@linux.vnet.ibm.com \
    --cc=borislav.petkov@amd.com \
    --cc=bp@amd64.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@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