From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754879Ab3IJIMI (ORCPT ); Tue, 10 Sep 2013 04:12:08 -0400 Received: from merlin.infradead.org ([205.233.59.134]:40505 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752868Ab3IJIMF (ORCPT ); Tue, 10 Sep 2013 04:12:05 -0400 Date: Tue, 10 Sep 2013 10:11:56 +0200 From: Peter Zijlstra To: John Stultz Cc: LKML , Steven Rostedt , Ingo Molnar , Thomas Gleixner Subject: Re: [PATCH] [RFC] seqcount: Add lockdep functionality to seqcount/seqlock structures Message-ID: <20130910081156.GK26785@twins.programming.kicks-ass.net> References: <1378788166-18474-1-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1378788166-18474-1-git-send-email-john.stultz@linaro.org> 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, Sep 09, 2013 at 09:42:46PM -0700, John Stultz wrote: > +++ b/include/linux/lockdep.h > @@ -510,6 +510,21 @@ static inline void print_irqtrace_events(struct task_struct *curr) > > #ifdef CONFIG_DEBUG_LOCK_ALLOC > # ifdef CONFIG_PROVE_LOCKING > +# define seqcount_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i) > +# define seqcount_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 2, NULL, i) > +# else > +# define seqcount_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i) > +# define seqcount_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 1, NULL, i) > +# endif > +# define seqcount_release(l, n, i) lock_release(l, n, i) > +#else > +# define seqcount_acquire(l, s, t, i) do { } while (0) > +# define seqcount_acquire_read(l, s, t, i) do { } while (0) > +# define seqcount_release(l, n, i) do { } while (0) > +#endif Please look at a recent lockdep.h, this pattern changed a little.