diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2017-01-27 15:54:57 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2017-02-08 14:13:18 +0100 |
commit | 76fdf1416eed264dee18aa7db3a32dcfa8572e03 (patch) | |
tree | c628f9ac0f2908a2fbc2ae8e3d4ff14235f0b417 /drivers/s390 | |
parent | s390/sclp: move early printk code to drivers (diff) | |
download | linux-76fdf1416eed264dee18aa7db3a32dcfa8572e03.tar.xz linux-76fdf1416eed264dee18aa7db3a32dcfa8572e03.zip |
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')
-rw-r--r-- | drivers/s390/char/sclp.c | 7 | ||||
-rw-r--r-- | drivers/s390/char/sclp.h | 7 | ||||
-rw-r--r-- | drivers/s390/char/sclp_early_core.c | 4 |
3 files changed, 11 insertions, 7 deletions
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index 272898225dbb..befc07acd3e0 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c @@ -94,13 +94,6 @@ static struct timer_list sclp_request_timer; /* Timer for queued requests. */ static struct timer_list sclp_queue_timer; -/* Internal state: is the driver initialized? */ -static volatile enum sclp_init_state_t { - sclp_init_state_uninitialized, - sclp_init_state_initializing, - sclp_init_state_initialized -} sclp_init_state = sclp_init_state_uninitialized; - /* Internal state: is a request active at the sclp? */ static volatile enum sclp_running_state_t { sclp_running_state_idle, diff --git a/drivers/s390/char/sclp.h b/drivers/s390/char/sclp.h index e1fc7eb043d6..0c1fa376df9e 100644 --- a/drivers/s390/char/sclp.h +++ b/drivers/s390/char/sclp.h @@ -211,6 +211,13 @@ int sclp_sync_request_timeout(sclp_cmdw_t command, void *sccb, int timeout); int sclp_sdias_init(void); void sclp_sdias_exit(void); +enum { + sclp_init_state_uninitialized, + sclp_init_state_initializing, + sclp_init_state_initialized +}; + +extern int sclp_init_state; extern int sclp_console_pages; extern int sclp_console_drop; extern unsigned long sclp_console_full; 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) |