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


Groups > linux.kernel > #1260511

Re: [PATCH v1 05/20] ARC: rwlock: disable interrupts in !LLSC variant

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH v1 05/20] ARC: rwlock: disable interrupts in !LLSC variant
Date 2015-11-02 11:10 +0100
Message-ID <qqkdQ-42a-35@gated-at.bofh.it> (permalink)
References <qpEeC-3hu-3@gated-at.bofh.it> <qqjrs-3wz-29@gated-at.bofh.it> <qqjUt-3G6-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.
--
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 | Find similar | Unroll thread


Thread

Re: [PATCH v1 05/20] ARC: rwlock: disable interrupts in !LLSC variant Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2015-11-02 10:50 +0100
  Re: [PATCH v1 05/20] ARC: rwlock: disable interrupts in !LLSC variant Peter Zijlstra <peterz@infradead.org> - 2015-11-02 11:10 +0100

csiph-web