Re: [git patch] free_irq() fixes

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jeff Garzik <jeff@...>
Cc: Andrew Morton <akpm@...>, LKML <linux-kernel@...>, <rmk@...>
Date: Tuesday, April 22, 2008 - 6:25 pm

On Tue, 22 Apr 2008, Jeff Garzik wrote:

Quite frankly, I'd actually prefer to just reinstate "dev" to the irq 
registration instead.

Why? Because that field is how we are able to track multiple interrupt 
registrations that share an IRQ. Now, the "request_irq()" logic has a 
special rule that actually tests that NULL is a valid cookie if the 
IRQF_SHARED bit isn't set, but isn't it a nice thing to double-check 
regardless?




This, in contrast, *really* sucks as a cookie. In fact, it's useless. If 
there are multiple tp3780i instances on the same irq, they will always 
have the same cookie.

That's why we pass in a "device" pointer or similar - exactly to make sure 
that the cookie is unique for that irq resource!

So it would be much nicer to fix the cookie to be a real device pointer 
(why not "pSettings" itself?) that is stable across the whole series of 
request_irq/free_irq. And that also would tend to get rid of the 
butt-ugly casts.

Willing to fix those up?

		Linus
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[git patch] free_irq() fixes, Jeff Garzik, (Tue Apr 22, 6:17 pm)
Re: [git patch] free_irq() fixes, Linus Torvalds, (Tue Apr 22, 6:25 pm)
Re: [git patch] free_irq() fixes, Jeff Garzik, (Tue Apr 22, 6:59 pm)
Re: [git patch] free_irq() fixes, Linus Torvalds, (Tue Apr 22, 7:20 pm)
Re: [git patch] free_irq() fixes, Jeff Garzik, (Tue Apr 22, 7:49 pm)
Re: [git patch] free_irq() fixes, Linus Torvalds, (Tue Apr 22, 7:52 pm)
Re: [git patch] free_irq() fixes, Adrian Bunk, (Tue Apr 22, 8:05 pm)
Re: [git patch] free_irq() fixes, Linus Torvalds, (Tue Apr 22, 8:16 pm)
Re: [git patch] free_irq() fixes, Rene Herman, (Wed Apr 23, 9:51 am)
Re: [git patch] free_irq() fixes, Jeff Garzik, (Wed Apr 23, 10:10 pm)
Re: [git patch] free_irq() fixes, Linus Torvalds, (Wed Apr 23, 10:19 pm)
Re: [git patch] free_irq() fixes, Eric W. Biederman, (Thu Apr 24, 1:59 am)
Re: [git patch] free_irq() fixes, Jeff Garzik, (Thu Apr 24, 6:53 am)
Re: [git patch] free_irq() fixes, Linus Torvalds, (Thu Apr 24, 11:16 am)
Re: [git patch] free_irq() fixes, Jeff Garzik, (Thu Apr 24, 11:40 am)
Re: [git patch] free_irq() fixes, Linus Torvalds, (Thu Apr 24, 11:55 am)
Re: [git patch] free_irq() fixes, Eric W. Biederman, (Thu Apr 24, 12:48 pm)
Re: [git patch] free_irq() fixes, Jeff Garzik, (Thu Apr 24, 1:30 pm)
Re: [git patch] free_irq() fixes, Eric W. Biederman, (Thu Apr 24, 10:53 pm)
Re: MSI, fun for the whole family, Eric W. Biederman, (Fri Apr 25, 1:08 am)
Re: MSI, fun for the whole family, Roland Dreier, (Thu Apr 24, 11:57 pm)
Re: MSI, fun for the whole family, Jeff Garzik, (Fri Apr 25, 12:35 am)
Re: MSI, fun for the whole family, Roland Dreier, (Fri Apr 25, 6:44 pm)
Re: MSI, fun for the whole family, Eric W. Biederman, (Fri Apr 25, 1:48 am)
Re: MSI, fun for the whole family, David Miller, (Fri Apr 25, 12:19 am)
Re: [git patch] free_irq() fixes, Linus Torvalds, (Thu Apr 24, 12:58 pm)
Re: [git patch] free_irq() fixes, Eric W. Biederman, (Thu Apr 24, 2:15 pm)
Re: [git patch] free_irq() fixes, Jeff Garzik, (Thu Apr 24, 12:16 pm)
Re: [git patch] free_irq() fixes, Alan Cox, (Thu Apr 24, 11:37 am)
Re: [git patch] free_irq() fixes, Jeff Garzik, (Thu Apr 24, 12:20 pm)