cli-sti-removal.txt fixup

Greg KH (greg@kroah.com)
Wed, 24 Jul 2002 23:19:26 -0700


On Wed, Jul 24, 2002 at 11:01:06PM -0700, Greg KH wrote:
> On Wed, Jul 24, 2002 at 06:17:17PM -0700, Linus Torvalds wrote:
> > > @@ -2814,15 +2814,15 @@
> > > }
> > > dmabuf->count = dmabuf->dmasize;
> > > outb(31,card->iobase+dmabuf->write_channel->port+OFF_LVI);
> > > - save_flags(flags);
> > > - cli();
> > > + local_irq_save(flags);
> > > + local_irq_disable();
> >
> > First off, "local_irq_save()" does both the save and the disable (the same
> > way "spin_lock_irqsave()" does), it's the "local_save_flags(") that is
> > equivalent to the old plain save_flags. So this should just be
> >
> > local_irq_save(flags);
>
> Ah, sorry, I didn't get that from cli-sti-removal.txt. Actually it
> looks like cli-sti-removal.txt is a bit wrong, as there is no
> local_irq_save_off() function. I'll send a patch for that next.

Here's that patch.

thanks,

greg k-h

diff -Nru a/Documentation/cli-sti-removal.txt b/Documentation/cli-sti-removal.txt
--- a/Documentation/cli-sti-removal.txt Wed Jul 24 23:25:38 2002
+++ b/Documentation/cli-sti-removal.txt Wed Jul 24 23:25:38 2002
@@ -94,10 +94,10 @@
released.

drivers that want to disable local interrupts (interrupts on the
-current CPU), can use the following five macros:
+current CPU), can use the following four macros:

local_irq_disable(), local_irq_enable(), local_irq_save(flags),
- local_irq_save_off(flags), local_irq_restore(flags)
+ local_irq_restore(flags)

but beware, their meaning and semantics are much simpler, far from
that of the old cli(), sti(), save_flags(flags) and restore_flags(flags)
@@ -107,11 +107,7 @@

local_irq_enable() => turn local IRQs on

- local_irq_save(flags) => save the current IRQ state into flags. The
- state can be on or off. (on some
- architectures there's even more bits in it.)
-
- local_irq_save_off(flags) => save the current IRQ state into flags and
+ local_irq_save(flags) => save the current IRQ state into flags and
disable interrupts.

local_irq_restore(flags) => restore the IRQ state from flags.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/