xref: /OK3568_Linux_fs/kernel/Documentation/s390/common_io.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun======================
2*4882a593SmuzhiyunS/390 common I/O-Layer
3*4882a593Smuzhiyun======================
4*4882a593Smuzhiyun
5*4882a593Smuzhiyuncommand line parameters, procfs and debugfs entries
6*4882a593Smuzhiyun===================================================
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunCommand line parameters
9*4882a593Smuzhiyun-----------------------
10*4882a593Smuzhiyun
11*4882a593Smuzhiyun* ccw_timeout_log
12*4882a593Smuzhiyun
13*4882a593Smuzhiyun  Enable logging of debug information in case of ccw device timeouts.
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun* cio_ignore = device[,device[,..]]
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun	device := {all | [!]ipldev | [!]condev | [!]<devno> | [!]<devno>-<devno>}
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun  The given devices will be ignored by the common I/O-layer; no detection
20*4882a593Smuzhiyun  and device sensing will be done on any of those devices. The subchannel to
21*4882a593Smuzhiyun  which the device in question is attached will be treated as if no device was
22*4882a593Smuzhiyun  attached.
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun  An ignored device can be un-ignored later; see the "/proc entries"-section for
25*4882a593Smuzhiyun  details.
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun  The devices must be given either as bus ids (0.x.abcd) or as hexadecimal
28*4882a593Smuzhiyun  device numbers (0xabcd or abcd, for 2.4 backward compatibility). If you
29*4882a593Smuzhiyun  give a device number 0xabcd, it will be interpreted as 0.0.abcd.
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun  You can use the 'all' keyword to ignore all devices. The 'ipldev' and 'condev'
32*4882a593Smuzhiyun  keywords can be used to refer to the CCW based boot device and CCW console
33*4882a593Smuzhiyun  device respectively (these are probably useful only when combined with the '!'
34*4882a593Smuzhiyun  operator). The '!' operator will cause the I/O-layer to _not_ ignore a device.
35*4882a593Smuzhiyun  The command line
36*4882a593Smuzhiyun  is parsed from left to right.
37*4882a593Smuzhiyun
38*4882a593Smuzhiyun  For example::
39*4882a593Smuzhiyun
40*4882a593Smuzhiyun	cio_ignore=0.0.0023-0.0.0042,0.0.4711
41*4882a593Smuzhiyun
42*4882a593Smuzhiyun  will ignore all devices ranging from 0.0.0023 to 0.0.0042 and the device
43*4882a593Smuzhiyun  0.0.4711, if detected.
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun  As another example::
46*4882a593Smuzhiyun
47*4882a593Smuzhiyun	cio_ignore=all,!0.0.4711,!0.0.fd00-0.0.fd02
48*4882a593Smuzhiyun
49*4882a593Smuzhiyun  will ignore all devices but 0.0.4711, 0.0.fd00, 0.0.fd01, 0.0.fd02.
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun  By default, no devices are ignored.
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun/proc entries
55*4882a593Smuzhiyun-------------
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun* /proc/cio_ignore
58*4882a593Smuzhiyun
59*4882a593Smuzhiyun  Lists the ranges of devices (by bus id) which are ignored by common I/O.
60*4882a593Smuzhiyun
61*4882a593Smuzhiyun  You can un-ignore certain or all devices by piping to /proc/cio_ignore.
62*4882a593Smuzhiyun  "free all" will un-ignore all ignored devices,
63*4882a593Smuzhiyun  "free <device range>, <device range>, ..." will un-ignore the specified
64*4882a593Smuzhiyun  devices.
65*4882a593Smuzhiyun
66*4882a593Smuzhiyun  For example, if devices 0.0.0023 to 0.0.0042 and 0.0.4711 are ignored,
67*4882a593Smuzhiyun
68*4882a593Smuzhiyun  - echo free 0.0.0030-0.0.0032 > /proc/cio_ignore
69*4882a593Smuzhiyun    will un-ignore devices 0.0.0030 to 0.0.0032 and will leave devices 0.0.0023
70*4882a593Smuzhiyun    to 0.0.002f, 0.0.0033 to 0.0.0042 and 0.0.4711 ignored;
71*4882a593Smuzhiyun  - echo free 0.0.0041 > /proc/cio_ignore will furthermore un-ignore device
72*4882a593Smuzhiyun    0.0.0041;
73*4882a593Smuzhiyun  - echo free all > /proc/cio_ignore will un-ignore all remaining ignored
74*4882a593Smuzhiyun    devices.
75*4882a593Smuzhiyun
76*4882a593Smuzhiyun  When a device is un-ignored, device recognition and sensing is performed and
77*4882a593Smuzhiyun  the device driver will be notified if possible, so the device will become
78*4882a593Smuzhiyun  available to the system. Note that un-ignoring is performed asynchronously.
79*4882a593Smuzhiyun
80*4882a593Smuzhiyun  You can also add ranges of devices to be ignored by piping to
81*4882a593Smuzhiyun  /proc/cio_ignore; "add <device range>, <device range>, ..." will ignore the
82*4882a593Smuzhiyun  specified devices.
83*4882a593Smuzhiyun
84*4882a593Smuzhiyun  Note: While already known devices can be added to the list of devices to be
85*4882a593Smuzhiyun	ignored, there will be no effect on then. However, if such a device
86*4882a593Smuzhiyun	disappears and then reappears, it will then be ignored. To make
87*4882a593Smuzhiyun	known devices go away, you need the "purge" command (see below).
88*4882a593Smuzhiyun
89*4882a593Smuzhiyun  For example::
90*4882a593Smuzhiyun
91*4882a593Smuzhiyun	"echo add 0.0.a000-0.0.accc, 0.0.af00-0.0.afff > /proc/cio_ignore"
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun  will add 0.0.a000-0.0.accc and 0.0.af00-0.0.afff to the list of ignored
94*4882a593Smuzhiyun  devices.
95*4882a593Smuzhiyun
96*4882a593Smuzhiyun  You can remove already known but now ignored devices via::
97*4882a593Smuzhiyun
98*4882a593Smuzhiyun	"echo purge > /proc/cio_ignore"
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun  All devices ignored but still registered and not online (= not in use)
101*4882a593Smuzhiyun  will be deregistered and thus removed from the system.
102*4882a593Smuzhiyun
103*4882a593Smuzhiyun  The devices can be specified either by bus id (0.x.abcd) or, for 2.4 backward
104*4882a593Smuzhiyun  compatibility, by the device number in hexadecimal (0xabcd or abcd). Device
105*4882a593Smuzhiyun  numbers given as 0xabcd will be interpreted as 0.0.abcd.
106*4882a593Smuzhiyun
107*4882a593Smuzhiyun* /proc/cio_settle
108*4882a593Smuzhiyun
109*4882a593Smuzhiyun  A write request to this file is blocked until all queued cio actions are
110*4882a593Smuzhiyun  handled. This will allow userspace to wait for pending work affecting
111*4882a593Smuzhiyun  device availability after changing cio_ignore or the hardware configuration.
112*4882a593Smuzhiyun
113*4882a593Smuzhiyun* For some of the information present in the /proc filesystem in 2.4 (namely,
114*4882a593Smuzhiyun  /proc/subchannels and /proc/chpids), see driver-model.txt.
115*4882a593Smuzhiyun  Information formerly in /proc/irq_count is now in /proc/interrupts.
116*4882a593Smuzhiyun
117*4882a593Smuzhiyun
118*4882a593Smuzhiyundebugfs entries
119*4882a593Smuzhiyun---------------
120*4882a593Smuzhiyun
121*4882a593Smuzhiyun* /sys/kernel/debug/s390dbf/cio_*/ (S/390 debug feature)
122*4882a593Smuzhiyun
123*4882a593Smuzhiyun  Some views generated by the debug feature to hold various debug outputs.
124*4882a593Smuzhiyun
125*4882a593Smuzhiyun  - /sys/kernel/debug/s390dbf/cio_crw/sprintf
126*4882a593Smuzhiyun    Messages from the processing of pending channel report words (machine check
127*4882a593Smuzhiyun    handling).
128*4882a593Smuzhiyun
129*4882a593Smuzhiyun  - /sys/kernel/debug/s390dbf/cio_msg/sprintf
130*4882a593Smuzhiyun    Various debug messages from the common I/O-layer.
131*4882a593Smuzhiyun
132*4882a593Smuzhiyun  - /sys/kernel/debug/s390dbf/cio_trace/hex_ascii
133*4882a593Smuzhiyun    Logs the calling of functions in the common I/O-layer and, if applicable,
134*4882a593Smuzhiyun    which subchannel they were called for, as well as dumps of some data
135*4882a593Smuzhiyun    structures (like irb in an error case).
136*4882a593Smuzhiyun
137*4882a593Smuzhiyun  The level of logging can be changed to be more or less verbose by piping to
138*4882a593Smuzhiyun  /sys/kernel/debug/s390dbf/cio_*/level a number between 0 and 6; see the
139*4882a593Smuzhiyun  documentation on the S/390 debug feature (Documentation/s390/s390dbf.rst)
140*4882a593Smuzhiyun  for details.
141