> -----Original Message-----
> From: Borislav Petkov <b...@alien8.de>
> Sent: Monday, May 27, 2019 6:29 PM
> To: Ghannam, Yazen <yazen.ghan...@amd.com>
> Cc: Luck, Tony <tony.l...@intel.com>; linux-e...@vger.kernel.org; 
> linux-kernel@vger.kernel.org; x...@kernel.org
> Subject: Re: [PATCH v3 5/6] x86/MCE: Save MCA control bits that get set in 
> hardware
> 
> 
> I guess the cleanest way to handle his properly would be to have a
> function called something like __mcheck_cpu_init_banks() which gets
> called in mcheck_cpu_init() after the quirks have run and then does the
> final poking of the banks and sets b->init properly.
> 
> __mcheck_cpu_init_clear_banks() should then be renamed to
> __mcheck_cpu_clear_banks() to denote that it only clears the banks and
> would only do:
> 
>                 if (!b->init)
>                         continue;
> 
>                 wrmsrl(msr_ops.ctl(i), b->ctl);
>                 wrmsrl(msr_ops.status(i), 0);
> 

Would you mind if the function name stayed the same? The reason is that MCA_CTL 
is written here, which is the "init" part, and MCA_STATUS is cleared.

I can use another name for the check, e.g. __mcheck_cpu_check_banks() or 
__mcheck_cpu_banks_check_init().

Thanks,
Yazen

Reply via email to