Messages in this thread | | | From | Systemkennung Linux <> | Subject | Re: cli/sti | Date | Thu, 31 Jul 1997 01:39:55 +0200 (MET DST) |
| |
> 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. > > Example: > The loop driver assumes some kernel code is re-entrant, when it > definitely isn't (cli/sti pairs get executed). The bug strikes > mostly on a loaded system, so it was terribly hard to track this > bug down. Changing the code to restore the flags works fine, as > the code involved is otherwise 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.
Ralf
| |