Re: UHCI/USB/PCI/interrupts

Martin Mares (mj@ucw.cz)
Tue, 27 Jul 1999 23:46:33 +0200


Hello Paul,

> Well, this occurs in single user mode immediately after powering on.
> Also, lspci shows the graphics card on pin A, and indeed if I've

lspci reports interrupt pins of PCI slots which are routed
by motherboard circuitry to interrupt pins of the chipset, so
it's quite possible pin A of the particular "slot" corresponds
to chipset pin C.

> setpci'd pin C to an alternative IRQ, X still works.

> Any idea how to figure out the source of the interrupt? I've run
> setpci to dump register 3d on all devices which is listed as the
> interrupt pin for some devices, but it comes up with nothing.

> I presume this interrupt is going to have some, however small,
> effect on my system, so it would be nice to eliminate it.

> One other question, from what I can gather all handlers linked
> to the PCI interrupt are called each time the PCI irq is
> generated, but the handlers don't seem to check that their
> device generated the interrupt. Is that correct?

I believe the scenario is following:

o X don't use interrupts at all (one of the reasons is that
they just cannot :-)), but they by mistake enable interrupts
on the graphics card (for example completion of accelerator
command or something similar).

o PCI IRQ's are level-sensitive, so any card drives the
interrupt line active as long as the condition causing
the interrupt lasts (== the interrupt hasn't been handled
by the driver yet).

o If nobody else than X uses the IRQ, everything goes well
since the IRQ is not enabled on the interrupt controller
at all.

o If the kernel enables the IRQ on the interrupt controller
and the X server causes the video card IRQ to appear,
kernel interrupt routine is executed, but the video card
IRQ is not handled since there's nobody interested in it,
the interrupt handler returns, but the card still has
a pretty good reason for holding the IRQ line active,
so an interrupt is generated again ... ad infinitum.

Recent releases of XFree servers have some of these bugs fixed,
but I cannot be sure none remain.

Have a nice fortnight

-- 
Martin `MJ' Mares   <mj@ucw.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"System going down at 5 pm to install scheduler bug."

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