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