From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755236AbbFLNE6 (ORCPT ); Fri, 12 Jun 2015 09:04:58 -0400 Received: from casper.infradead.org ([85.118.1.10]:48903 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752275AbbFLNE4 (ORCPT ); Fri, 12 Jun 2015 09:04:56 -0400 Date: Fri, 12 Jun 2015 15:04:50 +0200 From: Peter Zijlstra To: Vineet Gupta Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, arc-linux-dev@synopsys.com, "Paul E. McKenney" , stable@vger.kernel.org Subject: Re: [PATCH v2] ARC: add smp barriers around atomics per Documentation/atomic_ops.txt Message-ID: <20150612130450.GY19282@twins.programming.kicks-ass.net> References: <1433850508-26317-19-git-send-email-vgupta@synopsys.com> <1434111359-6925-1-git-send-email-vgupta@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1434111359-6925-1-git-send-email-vgupta@synopsys.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 On Fri, Jun 12, 2015 at 05:45:59PM +0530, Vineet Gupta wrote: > - arch_spin_lock/unlock were lacking the ACQUIRE/RELEASE barriers > Since ARCv2 only provides load/load, store/store and all/all, we need > the full barrier > > - LLOCK/SCOND based atomics, bitops, cmpxchg, which return modified > values were lacking the explicit smp barriers. > > - Non LLOCK/SCOND varaints don't need the explicit barriers since that > is implicity provided by the spin locks used to implement the > critical section (the spin lock barriers in turn are also fixed in > this commit as explained above And iirc you're relying on asm-generic/barrier.h to issue smp_mb__{before,after}_atomic() as smp_mb(), right? Acked-by: Peter Zijlstra (Intel) Although I'd love to know why you need those extra barriers in your spinlocks...