lkml.org 
[lkml]   [1998]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: disabling interrupts?
Date
> 
>
> Hi, for a new driver that I'm writing, I need to be able to disable
> all interrupts _except_ one (Once that interrupt goes off, I should
> then enable all IRQs again). I don't see a good way of doing this,
> can someone tell me how to do it please?
>
> I should give some more details here before everyone shouts at me. This
> driver is /only/ for an x86 card that plugs into Acorn ARM-based systems.
> It communicates with the host software on the Acorn side which handles
> things like IO. So it's not like this driver should be portable to a
> new architecture, or I think this is the best way to write the driver.
> The specs say `on receipt of this instruction, you should disable other
> IRQs and hlt.
>

Hopefully, there will be a register on the card that will have a bit
such as "IRQ pending". You should be able to disable all interrupts
and poll this register until "IRQ pending" is true. However, you
shouldn't turn off interrupts for too long, since there are generally
other interrupts that need processing.

I would guess that whoever wrote the specs for this card never wrote
a driver for a real operating system. After you have the thing
working with interrupts off, I would try it with interrupts on, just
for kicks. It will probably work, at least most of the time.

And remember: no non-terminating loops in kernel mode. (I've been
careless too many times.)



dave...

<ds@stm.lbl.gov>



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

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