mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
Cc: tony.luck@intel.com, hpa@zytor.com, mingo@redhat.com,
	tglx@linutronix.de, dougthompson@xmission.com,
	mchehab@osg.samsung.com, x86@kernel.org,
	linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
	ashok.raj@intel.com, gong.chen@linux.intel.com,
	len.brown@intel.com, peterz@infradead.org, ak@linux.intel.com,
	alexander.shishkin@linux.intel.com
Subject: Re: [PATCH 4/4] x86/mce/AMD: Add comments for easier understanding
Date: Fri, 26 Feb 2016 18:44:02 +0100	[thread overview]
Message-ID: <20160226174402.GF28911@pd.tnic> (raw)
In-Reply-To: <56CDF5E4.4000206@amd.com>

On Wed, Feb 24, 2016 at 12:26:44PM -0600, Aravind Gopalakrishnan wrote:
> Hmm, we call this from mce_threshold_block_init() with set_lvt_off = 1 to
> write LVT offset value to MCi_MISC.
> And we call this from store_interrupt_enable() to program APIC INT TYPE-
>         if (tr->b->interrupt_enable)
>                 hi |= INT_TYPE_APIC;
> 
> and from store_threshold_limit() to re-set the "error count"-
>             hi = (hi & ~MASK_ERR_COUNT_HI) |
>                     (new_count & THRESHOLD_MAX);
> 
> So I thought it fit the description as to "what" it does..

threshold_restart_bank() reprograms the MISC MSR after sanity-checking
the fields supplied for that MSR. store_threshold_limit() sets the error
count, store_interrupt_enable() enables/disables the interrupt and both
call threshold_restart_bank() to do that.

But this is basically spelling the code now - I don't think we need to
comment in that detail.

/*
 * Called via smp_call_function_single(), must be called with correct
 * cpu affinity.
 */

is also useless.

> "This function provides user with capabilities to re-program the
> 'thresold_limit' and 'interrupt_enable' sysfs attributes"

No sorry, I don't want to be explaining every line. Just say: "Reprogram
the MISC MSR behind this threshold bank."

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.

  reply	other threads:[~2016-02-26 17:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16 21:45 [PATCH 0/4] Updates to EDAC and AMD MCE driver Aravind Gopalakrishnan
2016-02-16 21:45 ` [PATCH 1/4] EDAC, MCE, AMD: Enable error decoding of Scalable MCA errors Aravind Gopalakrishnan
2016-02-23 12:37   ` Borislav Petkov
2016-02-23 22:50     ` Aravind Gopalakrishnan
2016-02-24 11:28       ` Borislav Petkov
2016-02-24 17:57         ` Aravind Gopalakrishnan
2016-02-16 21:45 ` [PATCH 2/4] x86/mce/AMD: Fix logic to obtain block address Aravind Gopalakrishnan
2016-02-18 15:38   ` Aravind Gopalakrishnan
2016-02-23 12:39   ` Borislav Petkov
2016-02-23 22:56     ` Aravind Gopalakrishnan
2016-02-24 11:33       ` Borislav Petkov
2016-02-24 18:02         ` Aravind Gopalakrishnan
2016-02-24 20:15           ` Boris Petkov
2016-02-16 21:45 ` [PATCH 3/4] x86/mce: Clarify comments regarding deferred error Aravind Gopalakrishnan
2016-02-23 12:11   ` Borislav Petkov
2016-02-23 23:02     ` Aravind Gopalakrishnan
2016-02-24 11:37       ` Borislav Petkov
2016-02-24 18:06         ` Aravind Gopalakrishnan
2016-02-24 20:13           ` Boris Petkov
2016-02-16 21:45 ` [PATCH 4/4] x86/mce/AMD: Add comments for easier understanding Aravind Gopalakrishnan
2016-02-23 12:35   ` Borislav Petkov
2016-02-24 18:26     ` Aravind Gopalakrishnan
2016-02-26 17:44       ` Borislav Petkov [this message]
2016-02-26 19:08         ` Aravind Gopalakrishnan

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=20160226174402.GF28911@pd.tnic \
    --to=bp@alien8.de \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=aravind.gopalakrishnan@amd.com \
    --cc=ashok.raj@intel.com \
    --cc=dougthompson@xmission.com \
    --cc=gong.chen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=len.brown@intel.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --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