Re: [patch 3/4] genirq: add a quick check handler

From: Thomas Gleixner
Date: Thu Feb 26 2009 - 18:12:38 EST


On Thu, 26 Feb 2009, Andrew Morton wrote:
> > enum irqreturn {
> > IRQ_NONE,
> > IRQ_HANDLED,
> > + IRQ_NEEDS_HANDLING,
> > };
>
> The enquiring mind is wondering which of these values the quickcheck
> handler can return. IRQ_NEEDS_HANDLING or IRQ_NONE? Or can it
> legitimately return IRQ_HANDLED? If so, what would that semantically
> mean?

Yes it can return IRQ_HANDLED as well. That means no further action
(calling the slow path handler) is needed.

> I mean, an IRQ handler could easily have a super-fast-path and a slow
> path. It could decide to do the super-fast operation in hard irq
> context and return IRQ_HANDLED, and return IRQ_NEEDS_HANDLING if
> slow-path handling is needed?
>
> It's all a bit unclear and deserves documenting and thinking about.

Yep, I need to sit down and write up documentation.

> > + * @quick_check_handler: Function called before the real interrupt
> > + * handler. It checks if the interrupt originated
> > + * from the device. This can be NULL.
>
> So what semantics are implemented if this pointer is NULL? We just
> assume IRQ_NEEDS_HANDLING?

Correct.

tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/