tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Interrupt handlers in NetBSD 5.0

>>> If I want to defer a hardware interrupt, how do I disable that
>>> interrupt until the deferred interrupt handler gets executed[?]
>> That depends on your device [...]
> I understand that, but it is very important to stop interrupts from
> happening on the hardware vector, when deferring interrupts.

> Are you trying to explaing this is not possible?

No...just that it's device-specific.  That is, instead of telling the
OS or the interrupt routing hardware to ignore the interrupt, you need
to tell the device to stop generating it.

There is no device-independent way, since stopping a device from
generating an interrupt is a fundamentally device-specific operation.
Some hardware has interrupt control capability detailed enough to say
"ignore this particular device's interrupt".  But some hardware - eg,
PCI, which shares interrupt lines whenever there are more than four
devices behind the same bus - does not; there is no MI way to do it, so
our kernel does not provide MI support for it.

If your device cannot be told to stop generating the interrupt request,
you will need to handle it in the hard interrupt routine at least to
the extent necessary to satisfy the device.  Or, of course, use MD
facilities and accept the portability hit, in which case you should be
asking on the relevant port-* list rather than tech-kern. :)

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML      
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Home | Main Index | Thread Index | Old Index