Re: cli/sti

Victor Yodaiken (
Wed, 30 Jul 1997 18:15:14 -0600 (MDT)

> > Is there a general effort underway to squash cli/sti pairs?
> > I ask because I think there should be. The code should restore
> > the flags if it is going to be re-entrant.
> >
> > I wonder how much other code in the kernel makes assumptions about
> > the interrupt state.
> In adittion I'd like to see save_flags(); cli(); sequences to be
> replaced by save_and_cli() calls. I've already done this for the
> MIPS specific code. On MIPS this macro results in slightly shorter
> code that keeps the pipeline happier and therefore is faster.

I've seen some minor synchronization errors on SMP 2.1.42 under
the real-time patch apparently caused by running interrupt
handling code on more than one processor. I was surprised that there
were so few problems, but it might be useful to test Intel drivers
on SMP machines with the RT system.

Executing __sti under the RT system causes emulation of any pending
interrupts, thus both processors will run irq code.