All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about IRQ_PENDING/IRQ_REPLAY
@ 2001-03-03  7:20 Benjamin Herrenschmidt
  2001-03-03 18:00 ` Linus Torvalds
  0 siblings, 1 reply; 12+ messages in thread
From: Benjamin Herrenschmidt @ 2001-03-03  7:20 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

Hi Linus !

I've some questions regarding the behaviour of arch/i386/kernel/irq.c
regarding IRQ_PENDING and IRQ_REPLAY.

Especially, my question is about the code in enable_irq() which checks
for IRQ_PENDING, and then 
"replays" the interrupt by asking the APIC to issue it again.

I don't have a simple way on PPC to cause the interrupt to happen again,
as you can imagine this is rather controller-specific. However, looking
at the code closely, I couldn't figure out a case where having
IRQ_PENDING in enable_irq() makes sense.

How can IRQ_PENDING happen to be set on an IRQ_DISABLED interrupt, and
why would that matter (why should we take this interrupt) ?

AFAIK, IRQ_PENDING can only be set as a result of a call to do_IRQ().
Since we loop when calling the actual handler, I fail to see how we could
"miss" an interrupt. If the interrupt is actually disabled, we should not
get it at all, and if we did, I don't see why it would matter to resend
it when it gets enabled since disabled interrupts are supposed to be
ignored (well, they are by most PICs). Obviously, this matters only for
an edge interrupt as level ones will stay asserted until the device is happy.

I'd be glad if you could take the time to enlighten me about this as I'm
trying to make the PPC code as close as the i386, according to your
comment stating that it would be generic in 2.5, and I don't like having
code I don't fully understand ;)

Regards,
Ben.

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

end of thread, other threads:[~2001-03-05 21:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-03  7:20 Question about IRQ_PENDING/IRQ_REPLAY Benjamin Herrenschmidt
2001-03-03 18:00 ` Linus Torvalds
2001-03-03 21:48   ` Cort Dougan
2001-03-04 21:06     ` Benjamin Herrenschmidt
2001-03-05  6:07       ` Cort Dougan
2001-03-05  9:48         ` Benjamin Herrenschmidt
2001-03-05 10:00           ` Benjamin Herrenschmidt
2001-03-05 18:15         ` Linus Torvalds
2001-03-05 21:00           ` Cort Dougan
2001-03-05 21:47             ` Benjamin Herrenschmidt
2001-03-05 21:39           ` Benjamin Herrenschmidt
2001-03-04 12:36   ` Benjamin Herrenschmidt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.