All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org
Cc: Frank Munzert <munzert@de.ibm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [patch 06/15] kmsg: convert vmur to kmsg api.
Date: Mon, 28 Jul 2008 19:54:01 +0200	[thread overview]
Message-ID: <20080728175512.224375633@de.ibm.com> (raw)
In-Reply-To: 20080728175355.734299984@de.ibm.com

[-- Attachment #1: 805-kmsg-vmur.diff --]
[-- Type: text/plain, Size: 3794 bytes --]

From: Frank Munzert <munzert@de.ibm.com>

Signed-off-by: Frank Munzert <munzert@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

 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 <asm/ccwdev.h>
 #include <asm/debug.h>
 #include <asm/diag.h>
+#include <asm/kmsg.h>
 
 #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.

  parent reply	other threads:[~2008-07-28 17:54 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-28 17:53 [patch 00/15] [RFC] kmsg macros and script Martin Schwidefsky
2008-07-28 17:53 ` [patch 01/15] kmsg: Kernel message catalog macros Martin Schwidefsky
2008-07-28 18:12   ` Joe Perches
2008-07-29  8:07     ` Martin Schwidefsky
2008-07-30  8:30   ` Andrew Morton
2008-07-30  9:13     ` Martin Schwidefsky
2008-07-30  9:23       ` Andrew Morton
2008-07-28 17:53 ` [patch 02/15] kmsg: Kernel message catalog script Martin Schwidefsky
2008-07-28 19:28   ` Sam Ravnborg
2008-07-29  8:42     ` Martin Schwidefsky
2008-07-29  8:45       ` Sam Ravnborg
2008-07-29 11:09         ` Martin Schwidefsky
2008-07-29 15:01           ` Jochen Voß
2008-07-29 15:15             ` Martin Schwidefsky
2008-07-28 17:53 ` [patch 03/15] kmsg: convert cio message to kmsg api Martin Schwidefsky
2008-07-28 17:53 ` [patch 04/15] kmsg: convert vmcp " Martin Schwidefsky
2008-07-28 17:54 ` [patch 05/15] kmsg: convert cpcmd " Martin Schwidefsky
2008-07-28 17:54 ` Martin Schwidefsky [this message]
2008-07-28 17:54 ` [patch 07/15] kmsg: convert xpram messages " Martin Schwidefsky
2008-07-28 17:54 ` [patch 08/15] kmsg: convert cpacf printk " Martin Schwidefsky
2008-07-28 17:54 ` [patch 09/15] kmsg: convert time " Martin Schwidefsky
2008-07-28 17:54 ` [patch 10/15] kmsg: convert hypfs " Martin Schwidefsky
2008-07-28 17:54 ` [patch 11/15] kmsg: convert setup " Martin Schwidefsky
2008-07-28 17:54 ` [patch 12/15] kmsg: convert appldata " Martin Schwidefsky
2008-07-28 17:54 ` [patch 13/15] kmsg: convert monreader " Martin Schwidefsky
2008-07-28 17:54 ` [patch 14/15] kmsg: convert s390 debug feature " Martin Schwidefsky
2008-07-28 17:54 ` [patch 15/15] kmsg: convert monwriter printk messages " Martin Schwidefsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080728175512.224375633@de.ibm.com \
    --to=schwidefsky@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=munzert@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.