x86/mce: Fix incorrect comment in do_machine_check()
PATCH 1/1 x86/mce: Fix incorrect comment in do_machine_check()
In do_machine_check function, we can find the following code segment:
* ...
* /* mce_clear_state will clear *final, save locally for use later */
* m = *final;
*
* if (!no_way_out)
* mce_clear_state(toclear);
* ...
But the reality is that mce_clear_state function will not clear *final. It is just used to clear bank MSRs or the relative field of injectm used by MCE-Injection. Meanwhile, mce_reign executed by monarch CPU will clear *final, therefore we need to save it locally for use later.
Signed-off-by Chen Yucong <[email protected]>
--- arch/x86/kernel/cpu/mcheck/mce.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/x86/kernel/cpu/mcheck/mce.c +3 -1
@@ -1137,7 +1137,9 @@ void do_machine_check(struct pt_regs *regs, long error_code) } } -/* mce_clear_state will clear *final, save locally for use later */ +/* mce_reign executed by monarch CPU will clear *final(mces_seen), +* save locally for use later +*/ m = *final;if (!no_way_out)
Signature · 1 line
1.7.10.4