Commit 76fdf141 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

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: default avatarPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 9090f3fe
...@@ -94,13 +94,6 @@ static struct timer_list sclp_request_timer; ...@@ -94,13 +94,6 @@ static struct timer_list sclp_request_timer;
/* Timer for queued requests. */ /* Timer for queued requests. */
static struct timer_list sclp_queue_timer; 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? */ /* Internal state: is a request active at the sclp? */
static volatile enum sclp_running_state_t { static volatile enum sclp_running_state_t {
sclp_running_state_idle, sclp_running_state_idle,
......
...@@ -211,6 +211,13 @@ int sclp_sync_request_timeout(sclp_cmdw_t command, void *sccb, int timeout); ...@@ -211,6 +211,13 @@ int sclp_sync_request_timeout(sclp_cmdw_t command, void *sccb, int timeout);
int sclp_sdias_init(void); int sclp_sdias_init(void);
void sclp_sdias_exit(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_pages;
extern int sclp_console_drop; extern int sclp_console_drop;
extern unsigned long sclp_console_full; extern unsigned long sclp_console_full;
......
...@@ -16,6 +16,8 @@ static char _sclp_work_area[4096] __aligned(PAGE_SIZE) __section(data); ...@@ -16,6 +16,8 @@ static char _sclp_work_area[4096] __aligned(PAGE_SIZE) __section(data);
static bool have_vt220 __section(data); static bool have_vt220 __section(data);
static bool have_linemode __section(data); static bool have_linemode __section(data);
int sclp_init_state __section(data) = sclp_init_state_uninitialized;
static void _sclp_wait_int(void) static void _sclp_wait_int(void)
{ {
unsigned long psw_mask, addr, flags; unsigned long psw_mask, addr, flags;
...@@ -198,6 +200,8 @@ static void _sclp_print_vt220(const char *str, unsigned int len) ...@@ -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) void __sclp_print_early(const char *str, unsigned int len)
{ {
if (sclp_init_state != sclp_init_state_uninitialized)
return;
if (_sclp_setup(0) != 0) if (_sclp_setup(0) != 0)
return; return;
if (have_linemode) if (have_linemode)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment