All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ghannam, Yazen" <Yazen.Ghannam@amd.com>
To: Borislav Petkov <bp@suse.de>
Cc: "linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
	Tony Luck <tony.luck@intel.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 1/2] x86/mce/AMD: Redo use of SMCA MCA_DE{STAT,ADDR} registers
Date: Tue, 4 Apr 2017 13:30:55 +0000	[thread overview]
Message-ID: <BN6PR1201MB0131CA03C8A420AAD50DFCE5F80B0@BN6PR1201MB0131.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20170327172706.o3fnte74x3egidxd@pd.tnic>

> -----Original Message-----
> From: Borislav Petkov [mailto:bp@suse.de]
> Sent: Monday, March 27, 2017 1:27 PM
> To: Ghannam, Yazen <Yazen.Ghannam@amd.com>

...

> >  static void
> > -__log_error(unsigned int bank, bool deferred_err, bool threshold_err,
> > u64 misc)
> > +__log_error(unsigned int bank, bool deferred_err, bool use_smca_destat,
> > +			       bool threshold_err, u64 misc)
> 
> So I had to paste the function signature in a separate vim window and keep
> looking between those arguments' names and the function calls.
> 
> Because if I look at:
> 
> 	__log_error(bank, true, false, false, 0);
> 
> I absolutely have no clue what that code does. So we need to think of
> something better. From the looks of it, I guess we dealt with a single
> __log_error() function long enough. Perhaps it is time for separation:
> 
> log_error_deferred
> log_error_smca
> log_error...
> 
> and have a function __log_error() which all three call to do the work which all
> three share.
> 
> That should make the code readable again IMO. __log_error() as it is now is
> hard to follow anyway.
> 

Okay, will do.

> > @@ -832,25 +823,29 @@ asmlinkage __visible void __irq_entry
> smp_trace_deferred_error_interrupt(void)
> >  	exiting_ack_irq();
> >  }
> >
> > +static inline bool check_deferred_status(u64 status)
> 
> This function name does not tell me anything.
> 
> 	if (is_deferred_error(status))
> 
> tells me more.
> 

Okay.

Thanks,
Yazen

      reply	other threads:[~2017-04-04 13:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22 19:29 [PATCH 1/2] x86/mce/AMD: Redo use of SMCA MCA_DE{STAT,ADDR} registers Yazen Ghannam
2017-03-22 19:29 ` [PATCH 2/2] x86/mce/AMD: Carve out SMCA bank configuration Yazen Ghannam
2017-03-28 19:23   ` Borislav Petkov
2017-04-04 13:34     ` Ghannam, Yazen
2017-04-04 13:45       ` Borislav Petkov
2017-04-04 14:37         ` Ghannam, Yazen
2017-04-04 15:00           ` Borislav Petkov
2017-04-04 15:08             ` Ghannam, Yazen
2017-03-27 17:27 ` [PATCH 1/2] x86/mce/AMD: Redo use of SMCA MCA_DE{STAT,ADDR} registers Borislav Petkov
2017-04-04 13:30   ` Ghannam, Yazen [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=BN6PR1201MB0131CA03C8A420AAD50DFCE5F80B0@BN6PR1201MB0131.namprd12.prod.outlook.com \
    --to=yazen.ghannam@amd.com \
    --cc=bp@suse.de \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 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.