Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756666AbbGPVI3 (ORCPT ); Thu, 16 Jul 2015 17:08:29 -0400 Received: from casper.infradead.org ([85.118.1.10]:45514 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756503AbbGPVI0 (ORCPT ); Thu, 16 Jul 2015 17:08:26 -0400 Date: Thu, 16 Jul 2015 23:08:21 +0200 From: Peter Zijlstra To: Waiman Long Cc: Will Deacon , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, paulmck@linux.vnet.ibm.com Subject: Re: [PATCH v2 7/7] ARM: atomics: define our SMP atomics in terms of _relaxed operations Message-ID: <20150716210821.GC19282@twins.programming.kicks-ass.net> References: <1437060758-10381-1-git-send-email-will.deacon@arm.com> <1437060758-10381-8-git-send-email-will.deacon@arm.com> <55A816A3.1000502@hp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55A816A3.1000502@hp.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 671 Lines: 19 On Thu, Jul 16, 2015 at 04:40:03PM -0400, Waiman Long wrote: > On 07/16/2015 11:32 AM, Will Deacon wrote: > >@@ -117,6 +115,8 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size > > #error "SMP is not supported on this platform" ^^^^^^^^^^^^^ > > #endif > > > >+#define xchg xchg_relaxed > > Is that a typo? I think xchg() needs to be a full memory barrier. Pointless on UP. -- 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/