aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char
diff options
context:
space:
mode:
authorMichael Holzheu <holzheu@de.ibm.com>2005-06-25 17:55:33 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 19:24:37 -0400
commit66a464dbc8e0345b6f972b92bf1118e043d7c987 (patch)
tree4c8f83ce6b1879556025fe77b97629a8380aa4dd /drivers/s390/char
parent6b979de395c7e1b7e59f74a870e1d1911853eccb (diff)
[PATCH] s390: debug feature changes
This patch changes the memory allocation method for the s390 debug feature. Trace buffers had been allocated using the get_free_pages() function before. Therefore it was not possible to get big memory areas in a running system due to memory fragmentation. Now the trace buffers are subdivided into several subbuffers with pagesize. Therefore it is now possible to allocate more memory for the trace buffers and more trace records can be written. In addition to that, dynamic specification of the size of the trace buffers is implemented. It is now possible to change the size of a trace buffer using a new debugfs file instance. When writing a number into this file, the trace buffer size is changed to 'number * pagesize'. In the past all the traces could be obtained from userspace by accessing files in the "proc" filesystem. Now with debugfs we have a new filesystem which should be used for debugging purposes. This patch moves the debug feature from procfs to debugfs. Since the interface of debug_register() changed, all device drivers, which use the debug feature had to be adjusted. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/s390/char')
-rw-r--r--drivers/s390/char/tape_34xx.c6
-rw-r--r--drivers/s390/char/tape_core.c2
-rw-r--r--drivers/s390/char/tape_proc.c1
-rw-r--r--drivers/s390/char/vmcp.c2
4 files changed, 6 insertions, 5 deletions
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c
index 480ec87976fb..20be88e91fa1 100644
--- a/drivers/s390/char/tape_34xx.c
+++ b/drivers/s390/char/tape_34xx.c
@@ -1351,13 +1351,13 @@ tape_34xx_init (void)
1351{ 1351{
1352 int rc; 1352 int rc;
1353 1353
1354 TAPE_DBF_AREA = debug_register ( "tape_34xx", 1, 2, 4*sizeof(long)); 1354 TAPE_DBF_AREA = debug_register ( "tape_34xx", 2, 2, 4*sizeof(long));
1355 debug_register_view(TAPE_DBF_AREA, &debug_sprintf_view); 1355 debug_register_view(TAPE_DBF_AREA, &debug_sprintf_view);
1356#ifdef DBF_LIKE_HELL 1356#ifdef DBF_LIKE_HELL
1357 debug_set_level(TAPE_DBF_AREA, 6); 1357 debug_set_level(TAPE_DBF_AREA, 6);
1358#endif 1358#endif
1359 1359
1360 DBF_EVENT(3, "34xx init: $Revision: 1.21 $\n"); 1360 DBF_EVENT(3, "34xx init: $Revision: 1.23 $\n");
1361 /* Register driver for 3480/3490 tapes. */ 1361 /* Register driver for 3480/3490 tapes. */
1362 rc = ccw_driver_register(&tape_34xx_driver); 1362 rc = ccw_driver_register(&tape_34xx_driver);
1363 if (rc) 1363 if (rc)
@@ -1378,7 +1378,7 @@ tape_34xx_exit(void)
1378MODULE_DEVICE_TABLE(ccw, tape_34xx_ids); 1378MODULE_DEVICE_TABLE(ccw, tape_34xx_ids);
1379MODULE_AUTHOR("(C) 2001-2002 IBM Deutschland Entwicklung GmbH"); 1379MODULE_AUTHOR("(C) 2001-2002 IBM Deutschland Entwicklung GmbH");
1380MODULE_DESCRIPTION("Linux on zSeries channel attached 3480 tape " 1380MODULE_DESCRIPTION("Linux on zSeries channel attached 3480 tape "
1381 "device driver ($Revision: 1.21 $)"); 1381 "device driver ($Revision: 1.23 $)");
1382MODULE_LICENSE("GPL"); 1382MODULE_LICENSE("GPL");
1383 1383
1384module_init(tape_34xx_init); 1384module_init(tape_34xx_init);
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c
index b4df4a515b12..0597aa0e27ee 100644
--- a/drivers/s390/char/tape_core.c
+++ b/drivers/s390/char/tape_core.c
@@ -1186,7 +1186,7 @@ tape_mtop(struct tape_device *device, int mt_op, int mt_count)
1186static int 1186static int
1187tape_init (void) 1187tape_init (void)
1188{ 1188{
1189 TAPE_DBF_AREA = debug_register ( "tape", 1, 2, 4*sizeof(long)); 1189 TAPE_DBF_AREA = debug_register ( "tape", 2, 2, 4*sizeof(long));
1190 debug_register_view(TAPE_DBF_AREA, &debug_sprintf_view); 1190 debug_register_view(TAPE_DBF_AREA, &debug_sprintf_view);
1191#ifdef DBF_LIKE_HELL 1191#ifdef DBF_LIKE_HELL
1192 debug_set_level(TAPE_DBF_AREA, 6); 1192 debug_set_level(TAPE_DBF_AREA, 6);
diff --git a/drivers/s390/char/tape_proc.c b/drivers/s390/char/tape_proc.c
index 801d17cca34e..5fec0a10cc3d 100644
--- a/drivers/s390/char/tape_proc.c
+++ b/drivers/s390/char/tape_proc.c
@@ -15,6 +15,7 @@
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/vmalloc.h> 16#include <linux/vmalloc.h>
17#include <linux/seq_file.h> 17#include <linux/seq_file.h>
18#include <linux/proc_fs.h>
18 19
19#define TAPE_DBF_AREA tape_core_dbf 20#define TAPE_DBF_AREA tape_core_dbf
20 21
diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c
index dfbbf235ca2b..7f11a608a633 100644
--- a/drivers/s390/char/vmcp.c
+++ b/drivers/s390/char/vmcp.c
@@ -203,7 +203,7 @@ static int __init vmcp_init(void)
203 else 203 else
204 printk(KERN_WARNING 204 printk(KERN_WARNING
205 "z/VM CP interface not loaded. Could not register misc device.\n"); 205 "z/VM CP interface not loaded. Could not register misc device.\n");
206 vmcp_debug = debug_register("vmcp", 0, 1, 240); 206 vmcp_debug = debug_register("vmcp", 1, 1, 240);
207 debug_register_view(vmcp_debug, &debug_hex_ascii_view); 207 debug_register_view(vmcp_debug, &debug_hex_ascii_view);
208 return ret; 208 return ret;
209} 209}