Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760832AbYG1R6X (ORCPT ); Mon, 28 Jul 2008 13:58:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760677AbYG1R4G (ORCPT ); Mon, 28 Jul 2008 13:56:06 -0400 Received: from mtagate5.de.ibm.com ([195.212.29.154]:8292 "EHLO mtagate5.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760671AbYG1R4C (ORCPT ); Mon, 28 Jul 2008 13:56:02 -0400 Message-Id: <20080728175512.224375633@de.ibm.com> References: <20080728175355.734299984@de.ibm.com> User-Agent: quilt/0.46-1 Date: Mon, 28 Jul 2008 19:54:01 +0200 From: Martin Schwidefsky To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Cc: Frank Munzert , Martin Schwidefsky Subject: [patch 06/15] kmsg: convert vmur to kmsg api. Content-Disposition: inline; filename=805-kmsg-vmur.diff Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4040 Lines: 119 From: Frank Munzert Signed-off-by: Frank Munzert Signed-off-by: Martin Schwidefsky --- Documentation/s390/kmsg/vmur | 33 +++++++++++++++++++++++++++++++++ drivers/s390/char/vmur.c | 13 ++++++++----- 2 files changed, 41 insertions(+), 5 deletions(-) Index: quilt-2.6/Documentation/s390/kmsg/vmur =================================================================== --- /dev/null +++ quilt-2.6/Documentation/s390/kmsg/vmur @@ -0,0 +1,33 @@ +/*? + * Tag: vmur.1 + * Text: "The %s cannot be loaded without z/VM" + * Severity: Error + * Parameter: + * @1: z/VM virtual unit record device driver + * Description: + * The z/VM virtual unit record device driver provides Linux with access to + * z/VM virtual unit record devices like punch card readers, card punches, and + * line printers. On Linux instances that run in environments other than the + * z/VM hypervisor, the device driver does not provide any useful function and + * the corresponding vmur module cannot be loaded. + * User action: + * Load the vmur module only on Linux instances that run as guest operating + * systems of the z/VM hypervisor. If the z/VM virtual unit record device + * has been compiled into the kernel, ignore this message. + */ + +/*? + * Tag: vmur.2 + * Text: "Kernel function alloc_chrdev_region failed with error code %d" + * Severity: Error + * Parameter: + * @1: error code according to errno definitions + * Description: + * The z/VM virtual unit record device driver (vmur) needs to register a range + * of character device minor numbers from 0x0000 to 0xffff. + * This registration failed, probably because of memory constraints. + * User action: + * Free some memory and reload the vmur module. If the z/VM virtual unit + * record device driver has been compiled into the kernel reboot Linux. + * Consider assigning more memory to your LPAR or z/VM guest virtual machine. + */ Index: quilt-2.6/drivers/s390/char/vmur.c =================================================================== --- quilt-2.6.orig/drivers/s390/char/vmur.c +++ quilt-2.6/drivers/s390/char/vmur.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "vmur.h" @@ -40,7 +41,7 @@ MODULE_AUTHOR("IBM Corporation"); MODULE_DESCRIPTION("s390 z/VM virtual unit record device driver"); MODULE_LICENSE("GPL"); -#define PRINTK_HEADER "vmur: " +#define KMSG_COMPONENT "vmur" static dev_t ur_first_dev_maj_min; static struct class *vmur_class; @@ -988,7 +989,8 @@ static int __init ur_init(void) dev_t dev; if (!MACHINE_IS_VM) { - PRINT_ERR("%s is only available under z/VM.\n", ur_banner); + kmsg_err(1, "The %s cannot be loaded without z/VM\n", + ur_banner); return -ENODEV; } @@ -1007,7 +1009,8 @@ static int __init ur_init(void) rc = alloc_chrdev_region(&dev, 0, NUM_MINORS, "vmur"); if (rc) { - PRINT_ERR("alloc_chrdev_region failed: err = %d\n", rc); + kmsg_err(2, "Kernel function alloc_chrdev_region failed with " + "error code %d\n", rc); goto fail_unregister_driver; } ur_first_dev_maj_min = MKDEV(MAJOR(dev), 0); @@ -1017,7 +1020,7 @@ static int __init ur_init(void) rc = PTR_ERR(vmur_class); goto fail_unregister_region; } - PRINT_INFO("%s loaded.\n", ur_banner); + kmsg_info(0, "%s loaded.\n", ur_banner); return 0; fail_unregister_region: @@ -1035,7 +1038,7 @@ static void __exit ur_exit(void) unregister_chrdev_region(ur_first_dev_maj_min, NUM_MINORS); ccw_driver_unregister(&ur_driver); debug_unregister(vmur_dbf); - PRINT_INFO("%s unloaded.\n", ur_banner); + kmsg_info(0, "%s unloaded.\n", ur_banner); } module_init(ur_init); -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/