heh. Yes, I tried that too a year or so ago. Basically just
add
if (!(eflags & 0x0200))
whine();
to spin_lock_irq(). There was a *lot* of whining.
> > So the irqrestore functions are much more robust. I believe
> > that they should be the default choice. The non-restore
> > versions should be viewed as a micro-optimised version,
> > to be used with caution. The additional expense of the save/restore
> > is quite tiny - 20-30 cycles, perhaps.
>
> OTHO, if a function doesn't work correctly if it's called with disabled
> interrupts, then it should not use spin_lock_irqsave() - it's
> misleading.
> e.g. if it calls kmalloc(GFP_KERNEL), down(), schedule(), etc.
mm? Those are legal (albeit unpleasant) inside local_irq_save(),
but illegal inside global_cli() in 2.5. Aren't they? If not,
then release_kernel_lock() needs talking to.
-
-
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/