From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753360AbbKBKDU (ORCPT ); Mon, 2 Nov 2015 05:03:20 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:36603 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751310AbbKBKDQ (ORCPT ); Mon, 2 Nov 2015 05:03:16 -0500 Date: Mon, 2 Nov 2015 11:03:11 +0100 From: Peter Zijlstra To: Vineet Gupta Cc: Noam Camus , linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, talz@ezchip.com, gilf@ezchip.com, cmetcalf@ezchip.com Subject: Re: [PATCH v1 05/20] ARC: rwlock: disable interrupts in !LLSC variant Message-ID: <20151102100311.GO17308@twins.programming.kicks-ass.net> References: <1446297327-16298-1-git-send-email-noamc@ezchip.com> <1446297327-16298-6-git-send-email-noamc@ezchip.com> <56373019.6080501@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56373019.6080501@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 Mon, Nov 02, 2015 at 03:12:49PM +0530, Vineet Gupta wrote: > > @@ -664,16 +670,24 @@ static inline void arch_write_lock(arch_rwlock_t *rw) > > > > static inline void arch_read_unlock(arch_rwlock_t *rw) > > { > > + unsigned long flags; > > + > > + local_irq_save(flags); > > arch_spin_lock(&(rw->lock_mutex)); > > > Isn't raw_spin_lock_irqsave() equivalent and more concise ? You might run into header file recursion issues; also raw_spinlock has lockdep annotations added, whereas the above does not.