linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Level IRQ handling on Xilinx INTC with ARCH=powerpc
@ 2008-07-29 11:58 Sergey Temerkhanov
  2008-07-29 14:14 ` David Howells
  2008-08-08  9:31 ` [PATCH] " Sergey Temerkhanov
  0 siblings, 2 replies; 4+ messages in thread
From: Sergey Temerkhanov @ 2008-07-29 11:58 UTC (permalink / raw)
  To: linuxppc-dev

Hi, all!

I'm currently in process of development of Xilinx I2C IP core driver and I've run into the problem: the ISR for level-based IRQ is called twice.

It looks like level IRQ handling on Xilinx INTC with ARCH=powerpc is currently broken as Xilinx INTC requires IRQ acknowledge with IRQ signal deasserted (i.e. after ISR call). ISR is supposed to acknowledge level IRQ in the core which asserted it thus deasserting appropriate IRQ signal.
And handle_level_irq() which is currently used as high-level IRQ handler for Xilinx INTC only tries to acknowledge IRQ before ISR call. So that the IRQ remains asserted in INTC and after the call to desc->chip->unmask() causes spurious attempt to process the same IRQ again. However, call to desc->chip->ack() this time finishes the required procedure of IRQ acknowledge.

I see a few ways to resolve this:
1. Change high-level handler to __do_IRQ() (as for ARCH=ppc) with proper methods modification (which is deprecated).
2. Change handle_level_irq() so that it calls desc->chip->ack() or desc->chip->end() (and set chip->end to point to xilinx_intc_ack() for Xilinx INTC) before desc->chip->unmask() (may potentially cause breakage for other arches. But I've tried it and it works).
3. Acknowledge IRQ at INTC in ISR (quick'n'dirty hack).

Regards, Sergey Temerkhanov

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

end of thread, other threads:[~2008-08-08  9:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-29 11:58 Level IRQ handling on Xilinx INTC with ARCH=powerpc Sergey Temerkhanov
2008-07-29 14:14 ` David Howells
2008-07-29 21:35   ` Benjamin Herrenschmidt
2008-08-08  9:31 ` [PATCH] " Sergey Temerkhanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).