From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Paul E. McKenney" Subject: Re: [PATCH tip/core/rcu 2/7] sfc: Replace spin_is_locked() with lockdep Date: Mon, 12 Nov 2018 09:07:42 -0800 Message-ID: <20181112170742.GP4170@linux.ibm.com> References: <20181111200421.GA10551@linux.ibm.com> <20181111200443.10772-2-paulmck@linux.ibm.com> Reply-To: paulmck@linux.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org, Lance Roy , Solarflare linux maintainers , Bert Kenward , "David S. Miller" , netdev@vger.kernel.org To: Edward Cree Return-path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54618 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727976AbeKMDCA (ORCPT ); Mon, 12 Nov 2018 22:02:00 -0500 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wACH6jOa128200 for ; Mon, 12 Nov 2018 12:07:52 -0500 Received: from e15.ny.us.ibm.com (e15.ny.us.ibm.com [129.33.205.205]) by mx0a-001b2d01.pphosted.com with ESMTP id 2nqc6g4vyf-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 12 Nov 2018 12:07:52 -0500 Received: from localhost by e15.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 12 Nov 2018 17:07:51 -0000 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Mon, Nov 12, 2018 at 01:02:32PM +0000, Edward Cree wrote: > On 11/11/18 20:04, Paul E. McKenney wrote: > > From: Lance Roy > > > > lockdep_assert_held() is better suited to checking locking requirements, > > since it only checks if the current thread holds the lock regardless of > > whether someone else does. This is also a step towards possibly removing > > spin_is_locked(). > > > > Signed-off-by: Lance Roy > > Cc: Solarflare linux maintainers > > Cc: Edward Cree > > Cc: Bert Kenward > > Cc: "David S. Miller" > > Cc: > > Signed-off-by: Paul E. McKenney > > --- > Acked-by: Edward Cree Applied, thank you! Thanx, Paul > > drivers/net/ethernet/sfc/efx.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c > > index 98fe7e762e17..3643015a55cf 100644 > > --- a/drivers/net/ethernet/sfc/efx.c > > +++ b/drivers/net/ethernet/sfc/efx.c > > @@ -3167,7 +3167,7 @@ struct hlist_head *efx_rps_hash_bucket(struct efx_nic *efx, > > { > > u32 hash = efx_filter_spec_hash(spec); > > > > - WARN_ON(!spin_is_locked(&efx->rps_hash_lock)); > > + lockdep_assert_held(&efx->rps_hash_lock); > > if (!efx->rps_hash_table) > > return NULL; > > return &efx->rps_hash_table[hash % EFX_ARFS_HASH_TABLE_SIZE]; > >