Re: [patch] cli()/sti() cleanup, 2.5.27-A2

Ingo Molnar
2002-07-22T17:59:39Z

On Mon, 22 Jul 2002, Linus Torvalds wrote:

> I'd much rather keep the current "local_xxx" versions, since they
> clearly say that it's local to the CPU. Let's face it, people SHOULD NOT
> USE THESE!

okay, agreed.

> So I vote for
>
> local_irq_save(flags) - save and disable
> local_irq_restore(flags) - restore
> local_irq_disable() - disable
> local_irq_enable() - enable

i've added this one as well:

local_save_flags(flags) - save

a fair number of places want (and need) to use __save_flags(flags)-type of
functionality, without the irq-disabling side-effect.

But also, a number of places now do:

local_save_flags(flags);
local_irq_disable();

which should be:

local_irq_save(flags);

(these places will be simplified in an upcoming patch.)

The new __cli/__sti cleanup patch is at:

http://redhat.com/~mingo/remove-irqlock-patches/cli-sti-cleanup-2.5.27-B2

compiles, boots & works just fine on x86 UP and SMP.

Ingo