Re: disabling interrupts?

RHS Linux User (
Thu, 21 May 1998 13:55:55 -0700 (PDT)

> 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.)



To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to