On Fri, Oct 16, 1998 at 12:44:45PM +0200, Harald Koerfgen wrote:
> People, when writing device drivers for DECstations, DO NEVER EVER use code
> [disable or enable interrupts with en/disable_irq(irq)]
> That simply doesn't work and will cause endless headache.
Which is the proof that the implementation is broken. Since restore_flags
is only ever used to restore one single bit, the interrupt enable bit is
actually the only bit that needs to be restored. The current implementation
deliberately ignores this because on the so far supported platforms there
is no need to deal with this problem which saves a couple of instructions.
The second possibility to fix this is to modify enable_irq/disable_irq
such that they don't actually fiddle around with the status register bits
but either do nothing at all or use an interrupt disable bit in the
external interrupt source. The bits in the status register will then be
set on bootup and will stay unchanged after that.