lkml.org 
[lkml]   [1999]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: interrupt handling w/o handler?
From
Date
>>>>> "Mark" == Mark Lord <mlord@pobox.com> writes:

Mark> Jes Sorensen wrote:
>> You have to register a handler for thaat, otherwise how are you
>> guaranteed that the interrupt is handled and the hardware doesn't
>> keep reasserting the same interrupt over and over again.

Mark> I think Jeff might be looking for a function such as:

Mark> interruptable_sleep_on_irq(n): -- allocate unused irq(n), bind
Mark> in generic_irqhandler(n) -- save PID in wakeuptable(n) -- unmask
Mark> irq(n) -- sleep until woken up by generic_irqhandler(n) --
Mark> deallocate irq(n) -- exit

Which is generally not a good solution because you will have to call
disable_irq(source) to do it in a generic way. That would of course be
a problem in itself if the irq is shared, which easily happens with
the lack of interrupts on the x86, and which is the normal case on
some architectures. The real problem however is the disable_irq()
sucks as it has to go across all processors on SMP.

The only decent way to do this is to register an irq handler that can
shut up the interrupt source by acknowledging it properly instead of
calling disable_irq().

Jes

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.045 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site