linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edward Cree <ecree@solarflare.com>
To: "Paul E. McKenney" <paulmck@linux.ibm.com>,
	<linux-kernel@vger.kernel.org>
Cc: <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 <ldr709@gmail.com>,
	Solarflare linux maintainers <linux-net-drivers@solarflare.com>,
	Bert Kenward <bkenward@solarflare.com>,
	"David S. Miller" <davem@davemloft.net>, <netdev@vger.kernel.org>
Subject: Re: [PATCH tip/core/rcu 2/7] sfc: Replace spin_is_locked() with lockdep
Date: Mon, 12 Nov 2018 13:02:32 +0000	[thread overview]
Message-ID: <d5a895b9-6d0b-1d51-dc97-96864c5335af@solarflare.com> (raw)
In-Reply-To: <20181111200443.10772-2-paulmck@linux.ibm.com>

On 11/11/18 20:04, Paul E. McKenney wrote:
> From: Lance Roy <ldr709@gmail.com>
>
> 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 <ldr709@gmail.com>
> Cc: Solarflare linux maintainers <linux-net-drivers@solarflare.com>
> Cc: Edward Cree <ecree@solarflare.com>
> Cc: Bert Kenward <bkenward@solarflare.com>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: <netdev@vger.kernel.org>
> Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
> ---
Acked-by: Edward Cree <ecree@solarflare.com>
>  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];



  reply	other threads:[~2018-11-12 13:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-11 20:04 [PATCH tip/core/rcu 0/7] Use lockdep instead of asserting spin_is_locked() for v4.21/v5.0 Paul E. McKenney
2018-11-11 20:04 ` [PATCH tip/core/rcu 1/7] x86/PCI: Replace spin_is_locked() with lockdep Paul E. McKenney
2018-11-11 20:04 ` [PATCH tip/core/rcu 2/7] sfc: " Paul E. McKenney
2018-11-12 13:02   ` Edward Cree [this message]
2018-11-12 17:07     ` Paul E. McKenney
2018-11-11 20:04 ` [PATCH tip/core/rcu 3/7] smsc: " Paul E. McKenney
2018-11-11 20:04 ` [PATCH tip/core/rcu 4/7] userfaultfd: " Paul E. McKenney
2018-11-11 20:04 ` [PATCH tip/core/rcu 5/7] locking/mutex: " Paul E. McKenney
2018-11-11 20:04 ` [PATCH tip/core/rcu 6/7] mm: " Paul E. McKenney
2018-11-15 18:49   ` Davidlohr Bueso
2018-11-16  7:05     ` Paul E. McKenney
2018-11-11 20:04 ` [PATCH tip/core/rcu 7/7] KVM: arm/arm64: vgic: " Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d5a895b9-6d0b-1d51-dc97-96864c5335af@solarflare.com \
    --to=ecree@solarflare.com \
    --cc=akpm@linux-foundation.org \
    --cc=bkenward@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=edumazet@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=ldr709@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net-drivers@solarflare.com \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=paulmck@linux.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).