summaryrefslogtreecommitdiff
path: root/drivers/s390/char/sclp_early_core.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2017-01-27 17:54:57 +0300
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2017-02-08 16:13:18 +0300
commit76fdf1416eed264dee18aa7db3a32dcfa8572e03 (patch)
treec628f9ac0f2908a2fbc2ae8e3d4ff14235f0b417 /drivers/s390/char/sclp_early_core.c
parent9090f3feb3637dfdc20a5a4af88ed897b2fa894f (diff)
downloadlinux-76fdf1416eed264dee18aa7db3a32dcfa8572e03.tar.xz
s390/sclp: disable early sclp code as soon as the base sclp driver is active
Make sure the early sclp code does not generate any sclp requests anymore as soon as the base sclp driver is active. Otherwise both drivers may see unexpected requests or may miss expected interrupts. Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/sclp_early_core.c')
-rw-r--r--drivers/s390/char/sclp_early_core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/s390/char/sclp_early_core.c b/drivers/s390/char/sclp_early_core.c
index f9c5b02d2685..2723ab56fb8f 100644
--- a/drivers/s390/char/sclp_early_core.c
+++ b/drivers/s390/char/sclp_early_core.c
@@ -16,6 +16,8 @@ static char _sclp_work_area[4096] __aligned(PAGE_SIZE) __section(data);
static bool have_vt220 __section(data);
static bool have_linemode __section(data);
+int sclp_init_state __section(data) = sclp_init_state_uninitialized;
+
static void _sclp_wait_int(void)
{
unsigned long psw_mask, addr, flags;
@@ -198,6 +200,8 @@ static void _sclp_print_vt220(const char *str, unsigned int len)
*/
void __sclp_print_early(const char *str, unsigned int len)
{
+ if (sclp_init_state != sclp_init_state_uninitialized)
+ return;
if (_sclp_setup(0) != 0)
return;
if (have_linemode)