Skip to content

Commit ecb1ff6

Browse files
committed
s390/debug: remove raw view
There is not a single user of the debug raw view. Therefore remove it before anybody uses it. If anybody would make use of the view it would expose the struct __debug_entry definition to userspace and really would make it uapi. This wouldn't be good, since the definition is suboptimal and needs to be changed. Right now the structure definition is only defined to be uapi, however there is no user. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
1 parent 7fa0d6f commit ecb1ff6

3 files changed

Lines changed: 4 additions & 56 deletions

File tree

‎Documentation/s390/s390dbf.rst‎

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ corresponding component. The debugfs normally should be mounted to
6767
The content of the directories are files which represent different views
6868
to the debug log. Each component can decide which views should be
6969
used through registering them with the function :c:func:`debug_register_view()`.
70-
Predefined views for hex/ascii, sprintf and raw binary data are provided.
70+
Predefined views for hex/ascii and sprintf data are provided.
7171
It is also possible to define other views. The content of
7272
a view can be inspected simply by reading the corresponding debugfs file.
7373

@@ -119,8 +119,6 @@ Predefined views:
119119
120120
extern struct debug_view debug_hex_ascii_view;
121121
122-
extern struct debug_view debug_raw_view;
123-
124122
extern struct debug_view debug_sprintf_view;
125123
126124
Examples
@@ -129,7 +127,7 @@ Examples
129127
.. code-block:: c
130128
131129
/*
132-
* hex_ascii- + raw-view Example
130+
* hex_ascii-view Example
133131
*/
134132
135133
#include <linux/init.h>
@@ -143,7 +141,6 @@ Examples
143141
144142
debug_info = debug_register("test", 1, 4, 4 );
145143
debug_register_view(debug_info, &debug_hex_ascii_view);
146-
debug_register_view(debug_info, &debug_raw_view);
147144
148145
debug_text_event(debug_info, 4 , "one ");
149146
debug_int_exception(debug_info, 4, 4711);
@@ -201,7 +198,7 @@ debugfs-files:
201198
Example::
202199

203200
> ls /sys/kernel/debug/s390dbf/dasd
204-
flush hex_ascii level pages raw
201+
flush hex_ascii level pages
205202
> cat /sys/kernel/debug/s390dbf/dasd/hex_ascii | sort -k2,2 -s
206203
00 00974733272:680099 2 - 02 0006ad7e 07 ea 4a 90 | ....
207204
00 00974733272:682210 2 - 02 0006ade6 46 52 45 45 | FREE
@@ -298,10 +295,9 @@ order to see the debug entries well formatted.
298295
Predefined Views
299296
----------------
300297

301-
There are three predefined views: hex_ascii, raw and sprintf.
298+
There are two predefined views: hex_ascii and sprintf.
302299
The hex_ascii view shows the data field in hex and ascii representation
303300
(e.g. ``45 43 4b 44 | ECKD``).
304-
The raw view returns a bytestream as the debug areas are stored in memory.
305301

306302
The sprintf view formats the debug entries in the same way as the sprintf
307303
function would do. The sprintf event/exception functions write to the
@@ -334,11 +330,6 @@ The format of the hex_ascii and sprintf view is as follows:
334330
- Return Address to caller
335331
- data field
336332

337-
The format of the raw view is:
338-
339-
- Header as described in debug.h
340-
- datafield
341-
342333
A typical line of the hex_ascii view will look like the following (first line
343334
is only for explanation and will not be displayed when 'cating' the view)::
344335

‎arch/s390/include/asm/debug.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ struct debug_view {
8282
};
8383

8484
extern struct debug_view debug_hex_ascii_view;
85-
extern struct debug_view debug_raw_view;
8685
extern struct debug_view debug_sprintf_view;
8786

8887
/* do NOT use the _common functions */

‎arch/s390/kernel/debug.c‎

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -90,27 +90,11 @@ static int debug_input_flush_fn(debug_info_t *id, struct debug_view *view,
9090
size_t user_buf_size, loff_t *offset);
9191
static int debug_hex_ascii_format_fn(debug_info_t *id, struct debug_view *view,
9292
char *out_buf, const char *in_buf);
93-
static int debug_raw_format_fn(debug_info_t *id,
94-
struct debug_view *view, char *out_buf,
95-
const char *in_buf);
96-
static int debug_raw_header_fn(debug_info_t *id, struct debug_view *view,
97-
int area, debug_entry_t *entry, char *out_buf);
98-
9993
static int debug_sprintf_format_fn(debug_info_t *id, struct debug_view *view,
10094
char *out_buf, debug_sprintf_entry_t *curr_event);
10195

10296
/* globals */
10397

104-
struct debug_view debug_raw_view = {
105-
"raw",
106-
NULL,
107-
&debug_raw_header_fn,
108-
&debug_raw_format_fn,
109-
NULL,
110-
NULL
111-
};
112-
EXPORT_SYMBOL(debug_raw_view);
113-
11498
struct debug_view debug_hex_ascii_view = {
11599
"hex_ascii",
116100
NULL,
@@ -1385,32 +1369,6 @@ static int debug_input_flush_fn(debug_info_t *id, struct debug_view *view,
13851369
return rc; /* number of input characters */
13861370
}
13871371

1388-
/*
1389-
* prints debug header in raw format
1390-
*/
1391-
static int debug_raw_header_fn(debug_info_t *id, struct debug_view *view,
1392-
int area, debug_entry_t *entry, char *out_buf)
1393-
{
1394-
int rc;
1395-
1396-
rc = sizeof(debug_entry_t);
1397-
memcpy(out_buf, entry, sizeof(debug_entry_t));
1398-
return rc;
1399-
}
1400-
1401-
/*
1402-
* prints debug data in raw format
1403-
*/
1404-
static int debug_raw_format_fn(debug_info_t *id, struct debug_view *view,
1405-
char *out_buf, const char *in_buf)
1406-
{
1407-
int rc;
1408-
1409-
rc = id->buf_size;
1410-
memcpy(out_buf, in_buf, id->buf_size);
1411-
return rc;
1412-
}
1413-
14141372
/*
14151373
* prints debug data in hex/ascii format
14161374
*/

0 commit comments

Comments
 (0)