From b90b34c6802865d07f482650eff82a4b38df6d79 Mon Sep 17 00:00:00 2001 From: Felix Beck Date: Sat, 9 Feb 2008 18:24:30 +0100 Subject: [S390] zcrypt: Do not start ap poll thread per default Do not start ap poll thread per default to increase perfomance with z/VM. Signed-off-by: Felix Beck Signed-off-by: Martin Schwidefsky --- drivers/s390/crypto/ap_bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 67aaff3e668..d0c6fd3b1c1 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c @@ -61,9 +61,9 @@ module_param_named(domain, ap_domain_index, int, 0000); MODULE_PARM_DESC(domain, "domain index for ap devices"); EXPORT_SYMBOL(ap_domain_index); -static int ap_thread_flag = 1; +static int ap_thread_flag = 0; module_param_named(poll_thread, ap_thread_flag, int, 0000); -MODULE_PARM_DESC(poll_thread, "Turn on/off poll thread, default is 1 (on)."); +MODULE_PARM_DESC(poll_thread, "Turn on/off poll thread, default is 0 (off)."); static struct device *ap_root_device = NULL; static DEFINE_SPINLOCK(ap_device_lock); -- cgit v1.2.3 From bf3f837804997e5f5d9888051e9e5356961af0f2 Mon Sep 17 00:00:00 2001 From: Ursula Braun Date: Sat, 9 Feb 2008 18:24:32 +0100 Subject: [S390] qdio: avoid hang when establishing qdio queues If qdio establish runs in parallel with a channel error, ccw_device_start_timeout may not trigger the qdio_timeout_handler. In this case neither QDIO_IRQ_STATE_ESTABLISHED nor QDIO_IRQ_STATE_ERR is reached and the following wait_event hangs forever. Solution: do not make use of the timeout option with ccw_device_start, but add a timeout to the following wait_event. Signed-off-by: Ursula Braun Signed-off-by: Martin Schwidefsky --- drivers/s390/cio/qdio.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'drivers') diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c index e2a781b6b21..097fc0967e9 100644 --- a/drivers/s390/cio/qdio.c +++ b/drivers/s390/cio/qdio.c @@ -3189,13 +3189,11 @@ qdio_establish(struct qdio_initialize *init_data) spin_lock_irqsave(get_ccwdev_lock(cdev),saveflags); ccw_device_set_options_mask(cdev, 0); - result=ccw_device_start_timeout(cdev,&irq_ptr->ccw, - QDIO_DOING_ESTABLISH,0, 0, - QDIO_ESTABLISH_TIMEOUT); + result = ccw_device_start(cdev, &irq_ptr->ccw, + QDIO_DOING_ESTABLISH, 0, 0); if (result) { - result2=ccw_device_start_timeout(cdev,&irq_ptr->ccw, - QDIO_DOING_ESTABLISH,0,0, - QDIO_ESTABLISH_TIMEOUT); + result2 = ccw_device_start(cdev, &irq_ptr->ccw, + QDIO_DOING_ESTABLISH, 0, 0); sprintf(dbf_text,"eq:io%4x",result); QDIO_DBF_TEXT2(1,setup,dbf_text); if (result2) { @@ -3219,10 +3217,10 @@ qdio_establish(struct qdio_initialize *init_data) return result; } - /* Timeout is cared for already by using ccw_device_start_timeout(). */ - wait_event_interruptible(cdev->private->wait_q, - irq_ptr->state == QDIO_IRQ_STATE_ESTABLISHED || - irq_ptr->state == QDIO_IRQ_STATE_ERR); + wait_event_interruptible_timeout(cdev->private->wait_q, + irq_ptr->state == QDIO_IRQ_STATE_ESTABLISHED || + irq_ptr->state == QDIO_IRQ_STATE_ERR, + QDIO_ESTABLISH_TIMEOUT); if (irq_ptr->state == QDIO_IRQ_STATE_ESTABLISHED) result = 0; -- cgit v1.2.3 From 59eb1ca7a8906412478656ba79261036261f4b76 Mon Sep 17 00:00:00 2001 From: Christian Borntraeger Date: Sat, 9 Feb 2008 18:24:33 +0100 Subject: [S390] sclp_vt220: Fix vt220 initialization There are two problems in the vt220 intialization: o Currently the vt220 console looses early printk events until the the vt220 tty is registered. o console should work if tty_register fails sclp_vt220_con_init calls __sclp_vt220_init and register_console. It does not register the driver with the sclp core code via sclp_register. That results in an sclp_send_mask=0. Therefore, __sclp_vt220_emit will reject buffers with EIO. Unfortunately register_console will cause the printk buffer to be sent to the console and, therefore, every early message gets dropped. The sclp_send_mask is set later during boot, when sclp_vt220_tty_init calls sclp_register. The solution is to move the sclp_register call from sclp_vt220_tty_init to __sclp_vt220_init. This makes sure that the console is properly registered with the sclp subsystem before the first log buffer messages are passed to the vt220 console. We also adopt the cleanup on error to keep the console alive if tty_register fails. Thanks to Peter Oberparleiter and Heiko Carstens for review and ideas for improvement. Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky --- drivers/s390/char/sclp_vt220.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'drivers') diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c index 68071622d4b..f47f4a768be 100644 --- a/drivers/s390/char/sclp_vt220.c +++ b/drivers/s390/char/sclp_vt220.c @@ -3,7 +3,7 @@ * SCLP VT220 terminal driver. * * S390 version - * Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation + * Copyright IBM Corp. 2003,2008 * Author(s): Peter Oberparleiter */ @@ -632,6 +632,9 @@ static void __init __sclp_vt220_cleanup(void) else free_bootmem((unsigned long) page, PAGE_SIZE); } + if (!list_empty(&sclp_vt220_register.list)) + sclp_unregister(&sclp_vt220_register); + sclp_vt220_initialized = 0; } static int __init __sclp_vt220_init(void) @@ -639,6 +642,7 @@ static int __init __sclp_vt220_init(void) void *page; int i; int num_pages; + int rc; if (sclp_vt220_initialized) return 0; @@ -667,7 +671,14 @@ static int __init __sclp_vt220_init(void) } list_add_tail((struct list_head *) page, &sclp_vt220_empty); } - return 0; + rc = sclp_register(&sclp_vt220_register); + if (rc) { + printk(KERN_ERR SCLP_VT220_PRINT_HEADER + "could not register vt220 - " + "sclp_register returned %d\n", rc); + __sclp_vt220_cleanup(); + } + return rc; } static const struct tty_operations sclp_vt220_ops = { @@ -688,22 +699,17 @@ static int __init sclp_vt220_tty_init(void) { struct tty_driver *driver; int rc; + int cleanup; /* Note: we're not testing for CONSOLE_IS_SCLP here to preserve * symmetry between VM and LPAR systems regarding ttyS1. */ driver = alloc_tty_driver(1); if (!driver) return -ENOMEM; + cleanup = !sclp_vt220_initialized; rc = __sclp_vt220_init(); if (rc) goto out_driver; - rc = sclp_register(&sclp_vt220_register); - if (rc) { - printk(KERN_ERR SCLP_VT220_PRINT_HEADER - "could not register tty - " - "sclp_register returned %d\n", rc); - goto out_init; - } driver->owner = THIS_MODULE; driver->driver_name = SCLP_VT220_DRIVER_NAME; @@ -721,15 +727,14 @@ static int __init sclp_vt220_tty_init(void) printk(KERN_ERR SCLP_VT220_PRINT_HEADER "could not register tty - " "tty_register_driver returned %d\n", rc); - goto out_sclp; + goto out_init; } sclp_vt220_driver = driver; return 0; -out_sclp: - sclp_unregister(&sclp_vt220_register); out_init: - __sclp_vt220_cleanup(); + if (cleanup) + __sclp_vt220_cleanup(); out_driver: put_tty_driver(driver); return rc; -- cgit v1.2.3