Thread (23 messages) 23 messages, 4 authors, 2011-05-05

Re: [PATCH 2/6] powerpc: make irq_{alloc, free}_virt private and remove count argument

From: Grant Likely <hidden>
Date: 2011-05-04 15:59:10
Also in: linux-devicetree, lkml

On Tue, May 03, 2011 at 11:47:47AM +1000, Benjamin Herrenschmidt wrote:
On Thu, 2011-04-28 at 14:01 -0600, Grant Likely wrote:
quoted
irq_alloc_virt() and irq_free_virt() aren't called anywhere but from
arch/powerpc/kernel/irq.c, and they are only ever called with count=1.
This patch removes the prototypes from the header file, removes the
count arguments, and cuts out the dead code.

Also removes obsolete references to irq_early_init()
Nack.

The count was intended to be able to allocate blocks of interrupts. This
was not used so far because we didn't support MSI blocks (for non-X
MSIs) but that is coming, and unfortunately, the API that was designed
for that is crap and requires contiguous IRQ numbers on the linux side
as well as on the device side (well device side is a HW requirement but
we could have been smarter on the Linux side).

So the ability to allocate blocks will be needed. In fact it's not clear
yet whether we'll also need them to be naturally aligned powers of two
or not at this stage. It depends how the bloody API is going to be used
by drivers.
Heh, I wondered about that, but there hasn't been any users for at
least 5 years (as evidenced by commit e12514650b, "Fix loop logic in
irq_alloc_virt()") so it was looking pretty dead, and it made the
patch to switch to using irq_alloc_desc*() quite a bit simpler if it
was removed.  :-)

I'm not particularly attached to this patch, so I can drop it from the
series.

g.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help