Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1362210 > unrolled thread
| Started by | Davidlohr Bueso <dave@stgolabs.net> |
|---|---|
| First post | 2016-03-22 00:30 +0100 |
| Last post | 2016-03-23 09:40 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH -tip] x86/mce: Use atomic_inc_return barrier when starting monad sync Davidlohr Bueso <dave@stgolabs.net> - 2016-03-22 00:30 +0100
Re: [PATCH -tip] x86/mce: Use atomic_inc_return barrier when starting monad sync Borislav Petkov <bp@alien8.de> - 2016-03-23 09:40 +0100
| From | Davidlohr Bueso <dave@stgolabs.net> |
|---|---|
| Date | 2016-03-22 00:30 +0100 |
| Subject | [PATCH -tip] x86/mce: Use atomic_inc_return barrier when starting monad sync |
| Message-ID | <rfhqO-4cX-5@gated-at.bofh.it> |
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> --- 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 f0c921b03e42..6b7039c166b8 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); /* -- 2.1.4
[toc] | [next] | [standalone]
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2016-03-23 09:40 +0100 |
| Subject | Re: [PATCH -tip] x86/mce: Use atomic_inc_return barrier when starting monad sync |
| Message-ID | <rfMuD-KQ-7@gated-at.bofh.it> |
| In reply to | #1362210 |
On Mon, Mar 21, 2016 at 04:19:56PM -0700, Davidlohr Bueso wrote:
> 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>
> ---
> arch/x86/kernel/cpu/mcheck/mce.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web