public inbox for linux-kernel@vger.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: Cornelia Huck <cornelia.huck@de.ibm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: [patch 07/47] cio: Cleanup debug feature usage.
Date: Thu, 20 Dec 2007 16:19:32 +0100	[thread overview]
Message-ID: <20071220152104.464452835@de.ibm.com> (raw)
In-Reply-To: 20071220151925.405881218@de.ibm.com

[-- Attachment #1: 106-cio-s390dbf.diff --]
[-- Type: text/plain, Size: 7065 bytes --]

From: Cornelia Huck <cornelia.huck@de.ibm.com>

Cleanup cio_debug.h.
Also make CIO_DEBUG add the "cio:" prefix to the printk string
so that it isn't needed for the debug feature.
Fix outdated comments for cio_debug_init() and clean it up.
Enlarge cio_crw to the same size as cio_msg so we may actually
find some relevant information there.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

 drivers/s390/cio/cio.c        |   38 ++++++++++++++++++--------------------
 drivers/s390/cio/cio_debug.h  |   22 +++++++++++-----------
 drivers/s390/cio/device_fsm.c |    8 ++++----
 3 files changed, 33 insertions(+), 35 deletions(-)

Index: quilt-2.6/drivers/s390/cio/cio.c
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/cio.c
+++ quilt-2.6/drivers/s390/cio/cio.c
@@ -56,39 +56,37 @@ __setup ("cio_msg=", cio_setup);
 
 /*
  * Function: cio_debug_init
- * Initializes three debug logs (under /proc/s390dbf) for common I/O:
- * - cio_msg logs the messages which are printk'ed when CONFIG_DEBUG_IO is on
+ * Initializes three debug logs for common I/O:
+ * - cio_msg logs generic cio messages
  * - cio_trace logs the calling of different functions
- * - cio_crw logs the messages which are printk'ed when CONFIG_DEBUG_CRW is on
- * debug levels depend on CONFIG_DEBUG_IO resp. CONFIG_DEBUG_CRW
+ * - cio_crw logs machine check related cio messages
  */
-static int __init
-cio_debug_init (void)
+static int __init cio_debug_init(void)
 {
-	cio_debug_msg_id = debug_register ("cio_msg", 16, 4, 16*sizeof (long));
+	cio_debug_msg_id = debug_register("cio_msg", 16, 4, 16 * sizeof(long));
 	if (!cio_debug_msg_id)
 		goto out_unregister;
-	debug_register_view (cio_debug_msg_id, &debug_sprintf_view);
-	debug_set_level (cio_debug_msg_id, 2);
-	cio_debug_trace_id = debug_register ("cio_trace", 16, 4, 16);
+	debug_register_view(cio_debug_msg_id, &debug_sprintf_view);
+	debug_set_level(cio_debug_msg_id, 2);
+	cio_debug_trace_id = debug_register("cio_trace", 16, 4, 16);
 	if (!cio_debug_trace_id)
 		goto out_unregister;
-	debug_register_view (cio_debug_trace_id, &debug_hex_ascii_view);
-	debug_set_level (cio_debug_trace_id, 2);
-	cio_debug_crw_id = debug_register ("cio_crw", 4, 4, 16*sizeof (long));
+	debug_register_view(cio_debug_trace_id, &debug_hex_ascii_view);
+	debug_set_level(cio_debug_trace_id, 2);
+	cio_debug_crw_id = debug_register("cio_crw", 16, 4, 16 * sizeof(long));
 	if (!cio_debug_crw_id)
 		goto out_unregister;
-	debug_register_view (cio_debug_crw_id, &debug_sprintf_view);
-	debug_set_level (cio_debug_crw_id, 2);
+	debug_register_view(cio_debug_crw_id, &debug_sprintf_view);
+	debug_set_level(cio_debug_crw_id, 4);
 	return 0;
 
 out_unregister:
 	if (cio_debug_msg_id)
-		debug_unregister (cio_debug_msg_id);
+		debug_unregister(cio_debug_msg_id);
 	if (cio_debug_trace_id)
-		debug_unregister (cio_debug_trace_id);
+		debug_unregister(cio_debug_trace_id);
 	if (cio_debug_crw_id)
-		debug_unregister (cio_debug_crw_id);
+		debug_unregister(cio_debug_crw_id);
 	printk(KERN_WARNING"cio: could not initialize debugging\n");
 	return -1;
 }
@@ -567,7 +565,7 @@ cio_validate_subchannel (struct subchann
 	 */
 	if (sch->st != 0) {
 		CIO_DEBUG(KERN_INFO, 0,
-			  "cio: Subchannel 0.%x.%04x reports "
+			  "Subchannel 0.%x.%04x reports "
 			  "non-I/O subchannel type %04X\n",
 			  sch->schid.ssid, sch->schid.sch_no, sch->st);
 		/* We stop here for non-io subchannels. */
@@ -600,7 +598,7 @@ cio_validate_subchannel (struct subchann
 	sch->lpm = sch->schib.pmcw.pam & sch->opm;
 
 	CIO_DEBUG(KERN_INFO, 0,
-		  "cio: Detected device %04x on subchannel 0.%x.%04X"
+		  "Detected device %04x on subchannel 0.%x.%04X"
 		  " - PIM = %02X, PAM = %02X, POM = %02X\n",
 		  sch->schib.pmcw.dev, sch->schid.ssid,
 		  sch->schid.sch_no, sch->schib.pmcw.pim,
Index: quilt-2.6/drivers/s390/cio/cio_debug.h
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/cio_debug.h
+++ quilt-2.6/drivers/s390/cio/cio_debug.h
@@ -8,20 +8,19 @@ extern debug_info_t *cio_debug_msg_id;
 extern debug_info_t *cio_debug_trace_id;
 extern debug_info_t *cio_debug_crw_id;
 
-#define CIO_TRACE_EVENT(imp, txt) do { \
+#define CIO_TRACE_EVENT(imp, txt) do {				\
 		debug_text_event(cio_debug_trace_id, imp, txt); \
 	} while (0)
 
-#define CIO_MSG_EVENT(imp, args...) do { \
-		debug_sprintf_event(cio_debug_msg_id, imp , ##args); \
+#define CIO_MSG_EVENT(imp, args...) do {				\
+		debug_sprintf_event(cio_debug_msg_id, imp , ##args);	\
 	} while (0)
 
-#define CIO_CRW_EVENT(imp, args...) do { \
-		debug_sprintf_event(cio_debug_crw_id, imp , ##args); \
+#define CIO_CRW_EVENT(imp, args...) do {				\
+		debug_sprintf_event(cio_debug_crw_id, imp , ##args);	\
 	} while (0)
 
-static inline void
-CIO_HEX_EVENT(int level, void *data, int length)
+static inline void CIO_HEX_EVENT(int level, void *data, int length)
 {
 	if (unlikely(!cio_debug_trace_id))
 		return;
@@ -32,9 +31,10 @@ CIO_HEX_EVENT(int level, void *data, int
 	}
 }
 
-#define CIO_DEBUG(printk_level,event_level,msg...) ({ \
-	if (cio_show_msg) printk(printk_level msg); \
-	CIO_MSG_EVENT (event_level, msg); \
-})
+#define CIO_DEBUG(printk_level, event_level, msg...) do {	\
+		if (cio_show_msg)				\
+			printk(printk_level "cio: " msg);	\
+		CIO_MSG_EVENT(event_level, msg);		\
+	} while (0)
 
 #endif
Index: quilt-2.6/drivers/s390/cio/device_fsm.c
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/device_fsm.c
+++ quilt-2.6/drivers/s390/cio/device_fsm.c
@@ -318,7 +318,7 @@ ccw_device_recog_done(struct ccw_device 
 	switch (state) {
 	case DEV_STATE_NOT_OPER:
 		CIO_DEBUG(KERN_WARNING, 2,
-			  "cio: SenseID : unknown device %04x on subchannel "
+			  "SenseID : unknown device %04x on subchannel "
 			  "0.%x.%04x\n", cdev->private->dev_id.devno,
 			  sch->schid.ssid, sch->schid.sch_no);
 		break;
@@ -344,7 +344,7 @@ ccw_device_recog_done(struct ccw_device 
 		}
 		/* Issue device info message. */
 		CIO_DEBUG(KERN_INFO, 2,
-			  "cio: SenseID : device 0.%x.%04x reports: "
+			  "SenseID : device 0.%x.%04x reports: "
 			  "CU  Type/Mod = %04X/%02X, Dev Type/Mod = "
 			  "%04X/%02X\n",
 			  cdev->private->dev_id.ssid,
@@ -354,7 +354,7 @@ ccw_device_recog_done(struct ccw_device 
 		break;
 	case DEV_STATE_BOXED:
 		CIO_DEBUG(KERN_WARNING, 2,
-			  "cio: SenseID : boxed device %04x on subchannel "
+			  "SenseID : boxed device %04x on subchannel "
 			  "0.%x.%04x\n", cdev->private->dev_id.devno,
 			  sch->schid.ssid, sch->schid.sch_no);
 		break;
@@ -439,7 +439,7 @@ ccw_device_done(struct ccw_device *cdev,
 
 	if (state == DEV_STATE_BOXED)
 		CIO_DEBUG(KERN_WARNING, 2,
-			  "cio: Boxed device %04x on subchannel %04x\n",
+			  "Boxed device %04x on subchannel %04x\n",
 			  cdev->private->dev_id.devno, sch->schid.sch_no);
 
 	if (cdev->private->flags.donotify) {

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.


  parent reply	other threads:[~2007-12-20 15:24 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-20 15:19 [patch 00/47] s390 2.6.25 patch queue Martin Schwidefsky
2007-12-20 15:19 ` [patch 01/47] Cleanup in Documentation/kernel-parameters.txt Martin Schwidefsky
2007-12-20 15:19 ` [patch 02/47] cio: Dump ccw device information in case of timeout Martin Schwidefsky
2007-12-20 15:19 ` [patch 03/47] cio: Use helpers instead of container_of() Martin Schwidefsky
2007-12-20 15:19 ` [patch 04/47] cio: css_driver: Use consistent parameters Martin Schwidefsky
2007-12-20 15:19 ` [patch 05/47] cio: Reset sch->driver Martin Schwidefsky
2007-12-20 15:19 ` [patch 06/47] cio: Add css_driver_{register,unregister} Martin Schwidefsky
2007-12-20 15:19 ` Martin Schwidefsky [this message]
2007-12-20 15:19 ` [patch 08/47] cio: Introduce subchannel->private Martin Schwidefsky
2007-12-20 15:19 ` [patch 09/47] cio: Extend adapter interrupt interface Martin Schwidefsky
2007-12-20 15:19 ` [patch 10/47] cio: I/O subchannel specific fields Martin Schwidefsky
2007-12-20 15:19 ` [patch 11/47] cio: Use dev_{g,s}et_drvdata() Martin Schwidefsky
2007-12-20 15:19 ` [patch 12/47] cio: Set driver->owner on css, ccw and ccwgroup busses Martin Schwidefsky
2007-12-20 15:19 ` [patch 13/47] cio: reduce cpu utilization during device scan Martin Schwidefsky
2007-12-20 15:19 ` [patch 14/47] qdio: Remove double checked value Martin Schwidefsky
2007-12-20 15:19 ` [patch 15/47] qdio: set QDIO_ACTIVATE_TIMEOUT to 5s Martin Schwidefsky
2007-12-20 15:19 ` [patch 16/47] sclp: sysfs interface for SCLP cpi Martin Schwidefsky
2007-12-20 15:19 ` [patch 17/47] Standby cpu activation/deactivation Martin Schwidefsky
2007-12-20 15:19 ` [patch 18/47] sclp: convert channel path configure code to use sync interface Martin Schwidefsky
2007-12-20 15:19 ` [patch 19/47] Optimize reference bit handling Martin Schwidefsky
2007-12-20 15:19 ` [patch 20/47] Fix tlb flushing with idte Martin Schwidefsky
2007-12-20 15:19 ` [patch 21/47] Change vmalloc defintions Martin Schwidefsky
2007-12-20 15:19 ` [patch 22/47] Print kernel version in dump_stack() and show_regs() Martin Schwidefsky
2007-12-20 15:19 ` [patch 23/47] Get rid of HOLES_IN_ZONE requirement Martin Schwidefsky
2007-12-20 15:19 ` [patch 24/47] DEBUG_PAGEALLOC support for s390 Martin Schwidefsky
2007-12-20 15:19 ` [patch 25/47] Remove owner_pc member from raw_spinlock_t Martin Schwidefsky
2007-12-20 15:19 ` [patch 26/47] Use new style spinlock initializer in __RWSEM_INITIALIZER Martin Schwidefsky
2007-12-20 15:19 ` [patch 27/47] Get rid of additional_cpus kernel parameter Martin Schwidefsky
2007-12-20 15:19 ` [patch 28/47] Remove appldata include from sysctl_check.c Martin Schwidefsky
2007-12-20 15:19 ` [patch 29/47] crypto: move s390 Kconfig options Martin Schwidefsky
2007-12-20 15:19 ` [patch 30/47] dasd: fix return value of dasd_generic_probe() Martin Schwidefsky
2007-12-20 15:19 ` [patch 31/47] arch/s390: Add missing "space" Martin Schwidefsky
2007-12-20 15:19 ` [patch 32/47] drivers/s390: " Martin Schwidefsky
2007-12-20 15:19 ` [patch 33/47] kernel: Shutdown Actions Interface Martin Schwidefsky
2007-12-20 15:19 ` [patch 34/47] Load disabled wait psw instead of stopping cpu on halt Martin Schwidefsky
2007-12-20 15:20 ` [patch 35/47] use LIST_HEAD instead of LIST_HEAD_INIT Martin Schwidefsky
2007-12-20 15:20 ` [patch 36/47] Allocate and free cpu lowcores and stacks when needed/possible Martin Schwidefsky
2007-12-20 15:20 ` [patch 37/47] Initialize sclp_ipl_info Martin Schwidefsky
2007-12-20 15:20 ` [patch 38/47] vmemmap: allocate struct pages before 1:1 mapping Martin Schwidefsky
2007-12-20 15:20 ` [patch 39/47] Use diag308 subcodes 3 and 6 for reboot and dump when possible Martin Schwidefsky
2007-12-20 15:20 ` [patch 40/47] arch/s390/: Spelling fixes Martin Schwidefsky
2007-12-20 15:20 ` [patch 41/47] include/asm-s390/: " Martin Schwidefsky
2007-12-20 15:20 ` [patch 42/47] drivers/s390/: " Martin Schwidefsky
2007-12-20 15:20 ` [patch 43/47] Move NOTES and BUG_TABLE Martin Schwidefsky
2007-12-20 15:20 ` [patch 44/47] single-step cleanup Martin Schwidefsky
2007-12-20 15:20 ` [patch 45/47] dasd: add hyper PAV support to DASD device driver, part 1 Martin Schwidefsky
2007-12-20 15:20 ` [patch 46/47] dasd: add hyper PAV support to DASD device driver, part 2 Martin Schwidefsky
2007-12-20 15:20 ` [patch 47/47] dasd: add hyper PAV support to DASD device driver, part 3 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=20071220152104.464452835@de.ibm.com \
    --to=schwidefsky@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox