public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@osdl.org>
Cc: Arjan van de Ven <arjan@infradead.org>, linux-kernel@vger.kernel.org
Subject: [patch, -rc5-mm1] locking validator: special rule: 8390.c disable_irq()
Date: Wed, 31 May 2006 22:02:36 +0200	[thread overview]
Message-ID: <20060531200236.GA31619@elte.hu> (raw)

untested on 8390 hardware, but ought to solve the lockdep false 
positive.

-----------------
Subject: locking validator: special rule: 8390.c disable_irq()
From: Ingo Molnar <mingo@elte.hu>

8390.c knows that ei_local->page_lock can only be used by an irq
context that it disabled - and can hence take the ->page_lock
without disabling hardirqs. Teach lockdep about this.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 drivers/net/8390.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux/drivers/net/8390.c
===================================================================
--- linux.orig/drivers/net/8390.c
+++ linux/drivers/net/8390.c
@@ -249,7 +249,7 @@ void ei_tx_timeout(struct net_device *de
 
 	/* Ugly but a reset can be slow, yet must be protected */
 		
-	disable_irq_nosync(dev->irq);
+	disable_irq_nosync_lockdep(dev->irq);
 	spin_lock(&ei_local->page_lock);
 		
 	/* Try to restart the card.  Perhaps the user has fixed something. */
@@ -257,7 +257,7 @@ void ei_tx_timeout(struct net_device *de
 	NS8390_init(dev, 1);
 		
 	spin_unlock(&ei_local->page_lock);
-	enable_irq(dev->irq);
+	enable_irq_lockdep(dev->irq);
 	netif_wake_queue(dev);
 }
     

             reply	other threads:[~2006-05-31 20:02 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-31 20:02 Ingo Molnar [this message]
2006-05-31 20:31 ` [patch, -rc5-mm1] locking validator: special rule: 8390.c disable_irq() Arjan van de Ven
2006-05-31 21:27   ` Ingo Molnar
2006-05-31 21:41   ` Alan Cox
2006-05-31 21:43     ` Arjan van de Ven
2006-05-31 21:47       ` Ingo Molnar
2006-05-31 21:56         ` Arjan van de Ven
2006-05-31 22:00           ` Ingo Molnar
2006-05-31 22:02             ` Arjan van de Ven
2006-06-03 14:37           ` Steven Rostedt
2006-06-03 21:53             ` Alan Cox
2006-06-03 22:34               ` Steven Rostedt
2006-06-04  9:34                 ` Arjan van de Ven
2006-06-04 13:16                   ` Steven Rostedt
2006-06-04 15:38                     ` Alan Cox
2006-06-04 15:44                       ` Steven Rostedt
2006-06-04 16:10                     ` Alan Cox
2006-06-04 16:22                       ` Steven Rostedt
2006-06-04 21:26                         ` Alan Cox
2006-06-04 21:28                           ` Steven Rostedt
2006-06-04 21:44                             ` Ingo Molnar
2006-06-05  1:04                               ` Steven Rostedt
2006-06-06  3:33                               ` [PATCH -mm] misroute-irq: Don't call desc->chip->end because of edge interrupts Steven Rostedt
2006-06-06  4:20                                 ` Andrew Morton
2006-06-06 10:46                                   ` Steven Rostedt
2006-06-06  8:01                                 ` Ingo Molnar
2006-06-06 10:50                                   ` Steven Rostedt
2006-06-06 21:48                                     ` Andrew Morton
2006-06-06 21:50                                       ` Ingo Molnar
2006-06-06  3:49                               ` [RFC][PATCH -mm] postpone misrouted irqs when disabled Steven Rostedt
2006-06-01  9:46         ` [patch, -rc5-mm1] locking validator: special rule: 8390.c disable_irq() Alan Cox
2006-06-01 10:02           ` Ingo Molnar

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=20060531200236.GA31619@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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