Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1240967

Re: [PATCH] x86: cmpxchg_double: Add missing memory clobber

From Pranith Kumar <bobby.prani@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] x86: cmpxchg_double: Add missing memory clobber
Date 2015-10-06 22:30 +0200
Message-ID <qgH22-8u5-9@gated-at.bofh.it> (permalink)
References <qgFCW-6fq-9@gated-at.bofh.it> <qgGSn-8hZ-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Oct 6, 2015 at 4:16 PM, H. Peter Anvin <hpa@zytor.com> wrote:
>
> NAK.  We already have the "+m" for exactly this reason; adding an
> explicit memory clobber should only be used to prevent movement of
> *other* memory operations around this one (i.e. a barrier).
>

OK. If that is so, can you please explain why we need it in the
__raw_cmpxchg() case? I think it is a good idea to make cmpxchg() and
cmpxchg_double() have similar barrier semantics.

Thanks!
-- 
Pranith
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] x86: cmpxchg_double: Add missing memory clobber Pranith Kumar <bobby.prani@gmail.com> - 2015-10-06 21:00 +0200
  Re: [PATCH] x86: cmpxchg_double: Add missing memory clobber "H. Peter Anvin" <hpa@zytor.com> - 2015-10-06 22:20 +0200
    Re: [PATCH] x86: cmpxchg_double: Add missing memory clobber Pranith Kumar <bobby.prani@gmail.com> - 2015-10-06 22:30 +0200
      Re: [PATCH] x86: cmpxchg_double: Add missing memory clobber "H. Peter Anvin" <hpa@zytor.com> - 2015-10-06 23:40 +0200
        Re: [PATCH] x86: cmpxchg_double: Add missing memory clobber Peter Zijlstra <peterz@infradead.org> - 2015-10-07 15:10 +0200

csiph-web