diff mbox series

x86/mce: Get rid of cpu_missing

Message ID 20211109083547.3546963-1-zhangzl2013@126.com (mailing list archive)
State New, archived
Headers show
Series x86/mce: Get rid of cpu_missing | expand

Commit Message

Zhaolong Zhang Nov. 9, 2021, 8:35 a.m. UTC
Drop cpu_missing since we have more capable mce_missing_cpus.

Suggested-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Zhaolong Zhang <zhangzl2013@126.com>
---
 arch/x86/kernel/cpu/mce/core.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Borislav Petkov Nov. 9, 2021, 9:15 a.m. UTC | #1
On Tue, Nov 09, 2021 at 04:35:47PM +0800, Zhaolong Zhang wrote:
> Drop cpu_missing since we have more capable mce_missing_cpus.

Who is "we"?

Also, you need to try harder with that commit message - mce_missing_cpus
is a cpumask and I don't see how a cpumask can be "more capable"...

Some more hints on a possible way to structure a commit message - those
are just hints - not necessarily rules - but it should help you get an
idea:

Problem is A.

It happens because of B.

Fix it by doing C.

(Potentially do D).

For more detailed info, see
Documentation/process/submitting-patches.rst, Section "2) Describe your
changes".

Also, to the tone, from Documentation/process/submitting-patches.rst:

 "Describe your changes in imperative mood, e.g. "make xyzzy do frotz"
  instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy
  to do frotz", as if you are giving orders to the codebase to change
  its behaviour."

Also, do not talk about what your patch does - that should hopefully be
visible in the diff itself. Rather, talk about *why* you're doing what
you're doing.

Also, please use passive voice in your commit message: no "we" or "I", etc,
and describe your changes in imperative mood.

Bottom line is: personal pronouns are ambiguous in text, especially with
so many parties/companies/etc developing the kernel so let's avoid them
please.

Thx.
Zhaolong Zhang Nov. 9, 2021, 2:19 p.m. UTC | #2
At 2021-11-09 17:15:11, "Borislav Petkov" <bp@alien8.de> wrote:
>On Tue, Nov 09, 2021 at 04:35:47PM +0800, Zhaolong Zhang wrote:
>> Drop cpu_missing since we have more capable mce_missing_cpus.
>
>Who is "we"?
>
>Also, you need to try harder with that commit message - mce_missing_cpus
>is a cpumask and I don't see how a cpumask can be "more capable"...
>
>Some more hints on a possible way to structure a commit message - those
>are just hints - not necessarily rules - but it should help you get an
>idea:
>
>Problem is A.
>
>It happens because of B.
>
>Fix it by doing C.
>
>(Potentially do D).
>
>For more detailed info, see
>Documentation/process/submitting-patches.rst, Section "2) Describe your
>changes".
>
>Also, to the tone, from Documentation/process/submitting-patches.rst:
>
> "Describe your changes in imperative mood, e.g. "make xyzzy do frotz"
>  instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy
>  to do frotz", as if you are giving orders to the codebase to change
>  its behaviour."
>
>Also, do not talk about what your patch does - that should hopefully be
>visible in the diff itself. Rather, talk about *why* you're doing what
>you're doing.
>
>Also, please use passive voice in your commit message: no "we" or "I", etc,
>and describe your changes in imperative mood.
>
>Bottom line is: personal pronouns are ambiguous in text, especially with
>so many parties/companies/etc developing the kernel so let's avoid them
>please.

Hi Boris,

Thank you so much for your kind reply. I really appreciate your detailed guidance.
I've sent a v2 patch with new descriptions, trying to be useful and brief.
Hope it is qualified...

Regards,
Zhaolong
diff mbox series

Patch

diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index 50a3e455cded..51aefffe39f1 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -99,7 +99,6 @@  struct mca_config mca_cfg __read_mostly = {
 
 static DEFINE_PER_CPU(struct mce, mces_seen);
 static unsigned long mce_need_notify;
-static int cpu_missing;
 
 /*
  * MCA banks polled by the period polling timer for corrected events.
@@ -314,8 +313,6 @@  static void mce_panic(const char *msg, struct mce *final, char *exp)
 		if (!apei_err)
 			apei_err = apei_write_mce(final);
 	}
-	if (cpu_missing)
-		pr_emerg(HW_ERR "Some CPUs didn't answer in synchronization\n");
 	if (exp)
 		pr_emerg(HW_ERR "Machine check: %s\n", exp);
 	if (!fake_panic) {
@@ -909,7 +906,6 @@  static int mce_timed_out(u64 *t, const char *msg)
 					 cpumask_pr_args(&mce_missing_cpus));
 			mce_panic(msg, NULL, NULL);
 		}
-		cpu_missing = 1;
 		return 1;
 	}
 	*t -= SPINUNIT;
@@ -2720,7 +2716,6 @@  struct dentry *mce_get_debugfs_dir(void)
 
 static void mce_reset(void)
 {
-	cpu_missing = 0;
 	atomic_set(&mce_fake_panicked, 0);
 	atomic_set(&mce_executing, 0);
 	atomic_set(&mce_callin, 0);