Skip to contentSkip to conversation

generic irq subsystem: ppc64 port

PATCH Benjamin Herrenschmidt 3 participants 4 messages Oct 19, 2004 – Oct 20, 2004 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi !

That patch will unfortunately break a load of ppc64 boxes.

If you look closely at the ppc64 code, you'll notice we don't use the irq_desc array directly but go through a get_irq_desc() accessor. This is because our interrupt numbers can be very large and scattered, and thus we have a remapping tree.

I still like the idea of the patch, so it would be useful if you added the possibility for us to just change that behaviour, that is replace all occursences of irq_descs + i with get_irq_desc() and provide a generic one that just does that, with a #ifndef so that the architecture can provide it's own.

If you agree with the principle, though, I suppose I can do it and send a proposed patch tomorrow.

Ben.

#2 lore raw
Quoted 9 lines · Benjamin Herrenschmidt

Hi !

That patch will unfortunately break a load of ppc64 boxes.

If you look closely at the ppc64 code, you'll notice we don't use the irq_desc array directly but go through a get_irq_desc() accessor. This is because our interrupt numbers can be very large and scattered, and thus we have a remapping tree.

Quoted 8 lines

I still like the idea of the patch, so it would be useful if you added the possibility for us to just change that behaviour, that is replace all occursences of irq_descs + i with get_irq_desc() and provide a generic one that just does that, with a #ifndef so that the architecture can provide it's own.

If you agree with the principle, though, I suppose I can do it and send a proposed patch tomorrow.

The PPC64 changes were actually my fault. I think get_irq_desc() is okay.

#3 lore raw
In reply to Benjamin Herrenschmidt
Quoted 5 lines · Benjamin Herrenschmidt

I still like the idea of the patch, so it would be useful if you added the possibility for us to just change that behaviour, that is replace all occursences of irq_descs + i with get_irq_desc() and provide a generic one that just does that, with a #ifndef so that the architecture can provide it's own.

sure, we could do that. But since there are other architectures with large irq-vector spaces too, you might want to try to move it into the generic IRQ code and just provide a way to switch between 1:1 mapped and sparse-mapped variants.

(of course this still means all of the direct indexing in kernel/irq/*.c would have to change.)

Ingo

#4 lore raw
Quoted 8 lines · Ingo Molnar
Quoted 5 lines · Benjamin Herrenschmidt

I still like the idea of the patch, so it would be useful if you added the possibility for us to just change that behaviour, that is replace all occursences of irq_descs + i with get_irq_desc() and provide a generic one that just does that, with a #ifndef so that the architecture can provide it's own.

Quoted 4 lines

sure, we could do that. But since there are other architectures with large irq-vector spaces too, you might want to try to move it into the generic IRQ code and just provide a way to switch between 1:1 mapped and sparse-mapped variants.

False alert ! In fact, Paulus rewrote that stuff a while ago and I totally forgot about it. We no longer do that, our get_irq_desc() is nowadays just doing (&irq_desc[(irq)]). We map the large physical interrupt numbers to "virtual" numbers that are the only thing the generic code sees, so it's fine.

Ben.