public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
	tony.luck@intel.com, x86@kernel.org, avadhut.naik@amd.com,
	john.allen@amd.com
Subject: Re: [PATCH 6/9] x86/mce: Unify AMD THR handler with MCA Polling
Date: Fri, 16 Aug 2024 10:01:06 -0400	[thread overview]
Message-ID: <20240816140106.GA29375@yaz-khff2.amd.com> (raw)
In-Reply-To: <20240603180409.GPZl4FmUZhYJHmcj2I@fat_crate.local>

On Mon, Jun 03, 2024 at 08:04:09PM +0200, Borislav Petkov wrote:
> On Thu, May 23, 2024 at 10:56:38AM -0500, Yazen Ghannam wrote:
> > diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
> > index 58b8efdcec0b..d6517b93c903 100644
> > --- a/arch/x86/kernel/cpu/mce/core.c
> > +++ b/arch/x86/kernel/cpu/mce/core.c
> > @@ -660,6 +660,12 @@ static noinstr void mce_read_aux(struct mce *m, int i)
> >  	}
> >  }
> >  
> > +static void reset_thr_limit(unsigned int bank)
> > +{
> > +	if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
> > +		return amd_reset_thr_limit(bank);
> > +}
> > +
> >  DEFINE_PER_CPU(unsigned, mce_poll_count);
> >  
> >  static bool ser_log_poll_error(struct mce *m)
> > @@ -769,6 +775,8 @@ void machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
> >  			mce_log(&m);
> >  
> >  clear_it:
> > +		reset_thr_limit(i);
> 
> 	if (mca_cfg.thresholding)
> 		reset_thr_limit(i);
> 
> and then you don't have to do a vendor check but simply set
> mca_cfg.thresholding on AMD after having defined it in the patch.
>

I can do that. The reset procedure is vendor-specific though. But we
only have the AMD case right now anyway.

There's already "mce_flags.amd_threshold" which got removed in patch 5
of this set. But I can keep that and reuse it here.

Thanks,
Yazen

  reply	other threads:[~2024-08-16 14:01 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-23 15:56 [PATCH 0/9] AMD MCA interrupts rework Yazen Ghannam
2024-05-23 15:56 ` [PATCH 1/9] x86/mce/inject: Only write MCA_MISC with user-set value Yazen Ghannam
2024-05-27  9:00   ` [tip: ras/core] x86/mce/inject: Only write MCA_MISC when a value has been supplied tip-bot2 for Yazen Ghannam
2024-05-23 15:56 ` [PATCH 2/9] x86/mce: Remove unused variable and return value in machine_check_poll() Yazen Ghannam
2024-05-27  9:00   ` [tip: ras/core] " tip-bot2 for Yazen Ghannam
2024-05-23 15:56 ` [PATCH 3/9] x86/mce: Increment MCP count only for timer calls Yazen Ghannam
2024-05-24 14:53   ` Borislav Petkov
2024-06-03 14:22     ` Yazen Ghannam
2024-06-03 15:24       ` Borislav Petkov
2024-05-23 15:56 ` [PATCH 4/9] x86/mce: Move machine_check_poll() status checks to helper functions Yazen Ghannam
2024-06-03 17:37   ` Borislav Petkov
2024-07-26 14:00     ` Yazen Ghannam
2024-08-01 13:04       ` Borislav Petkov
2024-05-23 15:56 ` [PATCH 5/9] x86/mce: Skip AMD threshold init if no threshold banks found Yazen Ghannam
2024-05-23 15:56 ` [PATCH 6/9] x86/mce: Unify AMD THR handler with MCA Polling Yazen Ghannam
2024-06-03 18:04   ` Borislav Petkov
2024-08-16 14:01     ` Yazen Ghannam [this message]
2024-05-23 15:56 ` [PATCH 7/9] x86/mce: Unify AMD DFR " Yazen Ghannam
2024-06-04 11:05   ` Borislav Petkov
2024-08-16 14:08     ` Yazen Ghannam
2024-06-04 11:18   ` Borislav Petkov
2024-05-23 15:56 ` [PATCH 8/9] x86/mce/amd: Enable interrupt vectors once per-CPU on SMCA systems Yazen Ghannam
2024-06-04 15:46   ` Borislav Petkov
2024-08-16 14:17     ` Yazen Ghannam
2024-05-23 15:56 ` [PATCH 9/9] x86/mce/amd: Support SMCA Corrected Error Interrupt Yazen Ghannam

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=20240816140106.GA29375@yaz-khff2.amd.com \
    --to=yazen.ghannam@amd.com \
    --cc=avadhut.naik@amd.com \
    --cc=bp@alien8.de \
    --cc=john.allen@amd.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox