From: tip-bot for Davidlohr Bueso <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-edac@vger.kernel.org, dbueso@suse.de, mingo@kernel.org,
tony.luck@intel.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
torvalds@linux-foundation.org, bp@suse.de, tglx@linutronix.de,
dave@stgolabs.net, peterz@infradead.org
Subject: [tip:ras/core] x86/mce: Remove explicit smp_rmb() when starting CPUs sync
Date: Wed, 13 Apr 2016 04:35:50 -0700 [thread overview]
Message-ID: <tip-bf92b1feb658f6a262daf3a87d790997a1dca0ff@git.kernel.org> (raw)
In-Reply-To: <1459929916-12852-3-git-send-email-bp@alien8.de>
Commit-ID: bf92b1feb658f6a262daf3a87d790997a1dca0ff
Gitweb: http://git.kernel.org/tip/bf92b1feb658f6a262daf3a87d790997a1dca0ff
Author: Davidlohr Bueso <dave@stgolabs.net>
AuthorDate: Wed, 6 Apr 2016 10:05:15 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 13 Apr 2016 10:54:23 +0200
x86/mce: Remove explicit smp_rmb() when starting CPUs sync
mce_start() has an explicit smp_wmb() to serialize writes to global_nwo
and mce_callin. However, atomic_inc_return() implies barriers on both
sides of the call, as such simply rely on this full SMP barrier.
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/1458602396-840-1-git-send-email-dave@stgolabs.net
Link: http://lkml.kernel.org/r/1459929916-12852-3-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/cpu/mcheck/mce.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index f0c921b..6b7039c 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -830,9 +830,9 @@ static int mce_start(int *no_way_out)
atomic_add(*no_way_out, &global_nwo);
/*
- * global_nwo should be updated before mce_callin
+ * Rely on the implied barrier below, such that global_nwo
+ * is updated before mce_callin.
*/
- smp_wmb();
order = atomic_inc_return(&mce_callin);
/*
next prev parent reply other threads:[~2016-04-13 11:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-06 8:05 [PATCH 0/3] x86/RAS: Some small things for tip Borislav Petkov
2016-04-06 8:05 ` [PATCH 1/3] x86/RAS: Rename AMD MCE injectior config item Borislav Petkov
2016-04-13 11:35 ` [tip:ras/core] x86/RAS: Rename AMD MCE injector " tip-bot for Borislav Petkov
2016-04-06 8:05 ` [PATCH 2/3] x86/mce: Remove explicit smp_rmb() when starting CPUs sync Borislav Petkov
2016-04-13 11:35 ` tip-bot for Davidlohr Bueso [this message]
2016-04-06 8:05 ` [PATCH 3/3] x86/mce: Avoid using object after free in genpool Borislav Petkov
2016-04-13 11:35 ` [tip:ras/core] " tip-bot for Tony Luck
-- strict thread matches above, loose matches on Subject: below --
2016-03-23 16:14 [PATCH] " Tony Luck
2016-03-23 17:33 ` Borislav Petkov
2016-03-23 20:47 ` Luck, Tony
2016-03-21 23:19 [PATCH -tip] x86/mce: Use atomic_inc_return barrier when starting monad sync Davidlohr Bueso
2016-03-23 8:30 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-bf92b1feb658f6a262daf3a87d790997a1dca0ff@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bp@suse.de \
--cc=dave@stgolabs.net \
--cc=dbueso@suse.de \
--cc=hpa@zytor.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox