> -----Original Message----- > From: Borislav Petkov <[email protected]> > Sent: Monday, May 27, 2019 6:29 PM > To: Ghannam, Yazen <[email protected]> > Cc: Luck, Tony <[email protected]>; [email protected]; > [email protected]; [email protected] > 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

