lkml.org 
[lkml]   [2019]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH RESEND 4/5] x86/MCE: Make number of MCA banks per_cpu
Date
> -----Original Message-----
> From: linux-edac-owner@vger.kernel.org <linux-edac-owner@vger.kernel.org> On Behalf Of Borislav Petkov
> Sent: Monday, April 8, 2019 3:50 PM
> To: Luck, Tony <tony.luck@intel.com>
> Cc: Ghannam, Yazen <Yazen.Ghannam@amd.com>; linux-edac@vger.kernel.org; linux-kernel@vger.kernel.org; x86@kernel.org
> Subject: Re: [PATCH RESEND 4/5] x86/MCE: Make number of MCA banks per_cpu
>
> On Mon, Apr 08, 2019 at 08:42:36PM +0000, Luck, Tony wrote:
> > > Actually, it should not be exported at all. A function returning the num
> > > banks is better instead.
> >
> > Are all the places it is used in non-pre-emptible sections of code? Looping
> > in the CMCI and #MC handlers should be fine. But do we need get_cpu()/put_cpu()
> > in any places?
>
> That export is needed only in the mce injector. Actually, it would be
> much cleaner if the injector would find out the count straight from the
> MSR as it does now, but be changed to do rdmsr_on_cpu() now, since can
> have different num_banks on a CPU.
>

Okay, so drop the export and leave the injector code as-is (it's already doing a rdmsrl_on_cpu()).

Is that okay?

Thanks,
Yazen
\
 
 \ /
  Last update: 2019-04-09 00:48    [W:0.119 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site