Re: [RFC] killing the NR_IRQS arrays.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Arnd Bergmann
Date: Wednesday, February 28, 2007 - 5:24 am

On Wednesday 28 February 2007, Eric W. Biederman wrote:

I have to admit I still don't really understand how this works
at all. Can a driver that uses msi-x have different handlers
for each of those interrupts registered simultaneously?

I would expect that instead there should be only one 'struct irq'
for the device, with the handler getting a 12 bit number argument.


I don't think there is much point in changing the s390 code, but
the way it is solved there may be interesting for other buses
as well. The interrupt handler there is not being registered
explicitly, but is part of the driver (in case of subchannel)
or of the device (in case of ccw_device) data structure.

Similarly, in a pci device, one could imagine that the
struct pci_driver contains a irq_handler_t member that
is registered from the pci_device_probe() function
if present.


Ok, I had an example in on of my previous posts, but based on the
discussion since then, it has become significantly simpler, basically
reducing the work to

struct irq *pci_irq_request(struct pci_device *dev,
			    irq_handler_t handler)
{
        if (!dev->irq)
                return -ENODEV;

        return irq_request(irq, handler, IRQF_SHARED,
			  &dev->driver->name, dev);
}
int pci_irq_free(struct pci_device *dev)
{
        return irq_free(dev->irq, dev);
}

The most significant change of this to the current code
would be that we can pass arguments down to irq_request
automatically, e.g. the irq handler can always get the
pci_device as its dev_id.


I was wondering about that. Do you only mean /proc/interrupts or
are there other user interfaces we need to worry about?
For /proc/interrupts, what could break if we have interrupt numbers
only local to each controller and potentially duplicate numbers
in the list? It's good to be paranoid about changes to proc files,
but I can definitely see value in having meaningful interrupt
numbers in there instead of making up a more or less random mapping
to a flat number space.

	Arnd <><
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] killing the NR_IRQS arrays., Eric W. Biederman, (Fri Feb 16, 5:10 am)
Re: [RFC] killing the NR_IRQS arrays., Andi Kleen, (Fri Feb 16, 5:16 am)
Re: [RFC] killing the NR_IRQS arrays., Ingo Molnar, (Fri Feb 16, 5:41 am)
Re: [RFC] killing the NR_IRQS arrays., Eric W. Biederman, (Fri Feb 16, 8:23 am)
Re: [RFC] killing the NR_IRQS arrays., Eric W. Biederman, (Fri Feb 16, 8:35 am)
Re: [RFC] killing the NR_IRQS arrays., Eric W. Biederman, (Fri Feb 16, 8:49 am)
Re: [RFC] killing the NR_IRQS arrays., Jeremy Fitzhardinge, (Fri Feb 16, 11:07 am)
Re: [RFC] killing the NR_IRQS arrays., Eric W. Biederman, (Fri Feb 16, 12:01 pm)
Re: [RFC] killing the NR_IRQS arrays., Jeremy Fitzhardinge, (Fri Feb 16, 12:06 pm)
Re: [RFC] killing the NR_IRQS arrays., Arnd Bergmann, (Fri Feb 16, 12:45 pm)
Re: [RFC] killing the NR_IRQS arrays., Russell King, (Fri Feb 16, 12:52 pm)
Re: [RFC] killing the NR_IRQS arrays., Arnd Bergmann, (Fri Feb 16, 1:43 pm)
Re: [RFC] killing the NR_IRQS arrays., Russell King, (Fri Feb 16, 1:59 pm)
Re: [RFC] killing the NR_IRQS arrays., Benjamin Herrenschmidt, (Fri Feb 16, 3:29 pm)
Re: [RFC] killing the NR_IRQS arrays., Benjamin Herrenschmidt, (Fri Feb 16, 3:33 pm)
Re: [RFC] killing the NR_IRQS arrays., Benjamin Herrenschmidt, (Fri Feb 16, 3:37 pm)
Re: [RFC] killing the NR_IRQS arrays., Arnd Bergmann, (Fri Feb 16, 6:37 pm)
Re: [RFC] killing the NR_IRQS arrays., Benjamin Herrenschmidt, (Fri Feb 16, 9:00 pm)
Re: [RFC] killing the NR_IRQS arrays., Eric W. Biederman, (Sat Feb 17, 1:51 am)
Re: [RFC] killing the NR_IRQS arrays., Eric W. Biederman, (Sat Feb 17, 2:06 am)
Re: [RFC] killing the NR_IRQS arrays., Eric W. Biederman, (Sat Feb 17, 2:34 am)
Re: [RFC] killing the NR_IRQS arrays., Benjamin Herrenschmidt, (Sat Feb 17, 2:04 pm)
Re: [RFC] killing the NR_IRQS arrays., Benjamin Herrenschmidt, (Sat Feb 17, 2:15 pm)
Re: [RFC] killing the NR_IRQS arrays., Benjamin Herrenschmidt, (Sat Feb 17, 2:20 pm)
Re: [RFC] killing the NR_IRQS arrays., Eric W. Biederman, (Sat Feb 17, 8:58 pm)
Re: [RFC] killing the NR_IRQS arrays., Eric W. Biederman, (Sat Feb 17, 9:58 pm)
Re: [RFC] killing the NR_IRQS arrays., Eric W. Biederman, (Sat Feb 17, 11:30 pm)
Re: [RFC] killing the NR_IRQS arrays., Benjamin Herrenschmidt, (Sun Feb 18, 12:58 pm)
Re: [RFC] killing the NR_IRQS arrays., Benjamin Herrenschmidt, (Sun Feb 18, 1:01 pm)
Re: [RFC] killing the NR_IRQS arrays., Arjan van de Ven, (Sun Feb 18, 2:24 pm)
Re: [RFC] killing the NR_IRQS arrays., Benjamin Herrenschmidt, (Sun Feb 18, 5:25 pm)
Re: [RFC] killing the NR_IRQS arrays., Eric W. Biederman, (Tue Feb 27, 1:29 pm)
Re: [RFC] killing the NR_IRQS arrays., Arnd Bergmann, (Tue Feb 27, 5:41 pm)
Re: [RFC] killing the NR_IRQS arrays., Eric W. Biederman, (Wed Feb 28, 12:20 am)
Re: [RFC] killing the NR_IRQS arrays., Benjamin Herrenschmidt, (Wed Feb 28, 1:09 am)
Re: [RFC] killing the NR_IRQS arrays., Arnd Bergmann, (Wed Feb 28, 5:24 am)
Re: [RFC] killing the NR_IRQS arrays., Segher Boessenkool, (Wed Feb 28, 6:02 am)
Re: [RFC] killing the NR_IRQS arrays., Eric W. Biederman, (Wed Feb 28, 6:28 am)
Re: [RFC] killing the NR_IRQS arrays., Eric W. Biederman, (Wed Feb 28, 6:53 am)
Re: [RFC] killing the NR_IRQS arrays., Benjamin Herrenschmidt, (Thu Mar 1, 3:47 am)