public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch, -rc5-mm1] locking validator: special rule: 3c59x.c disable_irq()
@ 2006-05-31 20:09 Ingo Molnar
  2006-05-31 20:32 ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2006-05-31 20:09 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Arjan van de Ven, Steven Rostedt, linux-kernel

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

3c59x.c's vortex_timer() function knows that vp->lock can only be used
by an irq context that it disabled - and can hence take the vp->lock
without disabling hardirqs. Teach lockdep about this.

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

Index: linux/drivers/net/3c59x.c
===================================================================
--- linux.orig/drivers/net/3c59x.c
+++ linux/drivers/net/3c59x.c
@@ -1904,7 +1904,7 @@ vortex_timer(unsigned long data)
 		printk(KERN_DEBUG "dev->watchdog_timeo=%d\n", dev->watchdog_timeo);
 	}
 
-	disable_irq(dev->irq);
+	disable_irq_lockdep(dev->irq);
 	old_window = ioread16(ioaddr + EL3_CMD) >> 13;
 	EL3WINDOW(4);
 	media_status = ioread16(ioaddr + Wn4_Media);
@@ -1985,7 +1985,7 @@ leave_media_alone:
 			 dev->name, media_tbl[dev->if_port].name);
 
 	EL3WINDOW(old_window);
-	enable_irq(dev->irq);
+	enable_irq_lockdep(dev->irq);
 	mod_timer(&vp->timer, RUN_AT(next_tick));
 	if (vp->deferred)
 		iowrite16(FakeIntr, ioaddr + EL3_CMD);

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch, -rc5-mm1] locking validator: special rule: 3c59x.c disable_irq()
  2006-05-31 20:09 [patch, -rc5-mm1] locking validator: special rule: 3c59x.c disable_irq() Ingo Molnar
@ 2006-05-31 20:32 ` Steven Rostedt
  2006-05-31 20:36   ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2006-05-31 20:32 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Andrew Morton, Arjan van de Ven, linux-kernel

On Wed, 2006-05-31 at 22:09 +0200, Ingo Molnar wrote:
> Subject: locking validator: special rule: 3c59x.c disable_irq()
> From: Ingo Molnar <mingo@elte.hu>
> 
> 3c59x.c's vortex_timer() function knows that vp->lock can only be used
> by an irq context that it disabled - and can hence take the vp->lock
> without disabling hardirqs. Teach lockdep about this.

Ingo,

Did you update your
http://people.redhat.com/mingo/lockdep-patches/lockdep-combo-2.6.17-rc5-mm1.patch
or did I miss the patch to add the disable_irq_lockdep function?

-- Steve



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch, -rc5-mm1] locking validator: special rule: 3c59x.c disable_irq()
  2006-05-31 20:32 ` Steven Rostedt
@ 2006-05-31 20:36   ` Ingo Molnar
  2006-05-31 21:32     ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2006-05-31 20:36 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Andrew Morton, Arjan van de Ven, linux-kernel


* Steven Rostedt <rostedt@goodmis.org> wrote:

> On Wed, 2006-05-31 at 22:09 +0200, Ingo Molnar wrote:
> > Subject: locking validator: special rule: 3c59x.c disable_irq()
> > From: Ingo Molnar <mingo@elte.hu>
> > 
> > 3c59x.c's vortex_timer() function knows that vp->lock can only be used
> > by an irq context that it disabled - and can hence take the vp->lock
> > without disabling hardirqs. Teach lockdep about this.
> 
> Ingo,
> 
> Did you update your
> http://people.redhat.com/mingo/lockdep-patches/lockdep-combo-2.6.17-rc5-mm1.patch
> or did I miss the patch to add the disable_irq_lockdep function?

i've updated it now, please check it out. (i sent the generic 
disable_irq_lockdep() bits to lkml separately but forgot to Cc: you)

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch, -rc5-mm1] locking validator: special rule: 3c59x.c disable_irq()
  2006-05-31 20:36   ` Ingo Molnar
@ 2006-05-31 21:32     ` Steven Rostedt
  2006-05-31 21:38       ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2006-05-31 21:32 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Andrew Morton, Arjan van de Ven, linux-kernel

On Wed, 2006-05-31 at 22:36 +0200, Ingo Molnar wrote:
> *
> 
> i've updated it now, please check it out. (i sent the generic 
> disable_irq_lockdep() bits to lkml separately but forgot to Cc: you)
> 

I've just booted it on my i386 SMP (with the vortex card) and it hasn't
reported anything yet.

Looks good, I'll let you know if I find anything else.

-- Steve



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch, -rc5-mm1] locking validator: special rule: 3c59x.c disable_irq()
  2006-05-31 21:32     ` Steven Rostedt
@ 2006-05-31 21:38       ` Ingo Molnar
  0 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2006-05-31 21:38 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Andrew Morton, Arjan van de Ven, linux-kernel


* Steven Rostedt <rostedt@goodmis.org> wrote:

> On Wed, 2006-05-31 at 22:36 +0200, Ingo Molnar wrote:
> > *
> > 
> > i've updated it now, please check it out. (i sent the generic 
> > disable_irq_lockdep() bits to lkml separately but forgot to Cc: you)
> > 
> 
> I've just booted it on my i386 SMP (with the vortex card) and it 
> hasn't reported anything yet.
> 
> Looks good, I'll let you know if I find anything else.

great and thanks for the testing!

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-05-31 21:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-31 20:09 [patch, -rc5-mm1] locking validator: special rule: 3c59x.c disable_irq() Ingo Molnar
2006-05-31 20:32 ` Steven Rostedt
2006-05-31 20:36   ` Ingo Molnar
2006-05-31 21:32     ` Steven Rostedt
2006-05-31 21:38       ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox