Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c59d744b authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky
Browse files

[S390] sclp: don't call local_bh_disable/_local_bh_enable if in_interrupt()



local_bh_disable/_local_bh_enable must not be called if in_irq() is
true. Besides that if in_interrupt() is true bottom halves are
disabled anyway.

Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 444f0e54
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -402,6 +402,7 @@ sclp_sync_wait(void)
	unsigned long flags;
	unsigned long flags;
	unsigned long cr0, cr0_sync;
	unsigned long cr0, cr0_sync;
	u64 timeout;
	u64 timeout;
	int irq_context;


	/* We'll be disabling timer interrupts, so we need a custom timeout
	/* We'll be disabling timer interrupts, so we need a custom timeout
	 * mechanism */
	 * mechanism */
@@ -414,6 +415,8 @@ sclp_sync_wait(void)
	}
	}
	local_irq_save(flags);
	local_irq_save(flags);
	/* Prevent bottom half from executing once we force interrupts open */
	/* Prevent bottom half from executing once we force interrupts open */
	irq_context = in_interrupt();
	if (!irq_context)
		local_bh_disable();
		local_bh_disable();
	/* Enable service-signal interruption, disable timer interrupts */
	/* Enable service-signal interruption, disable timer interrupts */
	trace_hardirqs_on();
	trace_hardirqs_on();
@@ -435,6 +438,7 @@ sclp_sync_wait(void)
	}
	}
	local_irq_disable();
	local_irq_disable();
	__ctl_load(cr0, 0, 0);
	__ctl_load(cr0, 0, 0);
	if (!irq_context)
		_local_bh_enable();
		_local_bh_enable();
	local_irq_restore(flags);
	local_irq_restore(flags);
}
}