kernels/linux-2.4.0/arch/s390/kernel/irq.c
/*
 * A global "cli()" while in an interrupt context
 * turns into just a local cli(). Interrupts
 * should use spinlocks for the (very unlikely)
 * case that they ever want to protect against
 * each other.
 *
 * If we already have local interrupts disabled,
 * this will not turn a local disable into a
 * global one (problems with spinlocks: this makes
 * save_flags+cli+sti usable inside a spinlock).
 */
A global "cli()" while in an interrupt context
turns into just a local cli(). Interrupts
should use spinlocks for the (very unlikely)
case that they ever want to protect against
each other.

If we already have local interrupts disabled,
this will not turn a local disable into a
global one (problems with spinlocks: this makes
save_flags+cli+sti usable inside a spinlock).
A global " cli () " while in an interrupt context turns into just a local cli () . Interrupts should use spinlocks for the ( very unlikely ) case that they ever want to protect against each other . If we already have local interrupts disabled this will not turn a local disable into a global one ( problems with spinlocks : this makes save_flags + cli + sti usable inside a spinlock ) .
void __global_cli(void)
{
	unsigned int flags;
	__save_flags(flags);
	if (flags & (1 << EFLAGS_I_SHIFT)) {
		int cpu = smp_processor_id();
		__cli();
		if (!in_irq())
			get_irqlock(cpu);
	}
}
void __global_cli ( void ) { unsigned int flags ; __save_flags ( flags ) ; if ( flags & ( 1 << EFLAGS_I_SHIFT ) ) { int cpu = smp_processor_id ( ) ; __cli ( ) ; if ( ! in_irq ( ) ) get_irqlock ( cpu ) ; } }
A global "cli()" while in an interrupt context
 turns into just a local cli().
A global " cli () " while in an interrupt context turns into just a local cli () .