<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/s390/char/con3215.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-03-13T08:23:47Z</updated>
<entry>
<title>s390/3215: use new address translation helpers</title>
<updated>2024-03-13T08:23:47Z</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2024-03-07T12:28:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e6ccda5139ea43ee6dff552b384131825650d760'/>
<id>urn:sha1:e6ccda5139ea43ee6dff552b384131825650d760</id>
<content type='text'>
Use virt_to_dma32() and friends to properly convert virtual to physical and
physical to virtual addresses so that "make C=1" does not generate any
warnings anymore.

Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>tty: con3215: convert to u8 and size_t</title>
<updated>2023-12-08T11:02:37Z</updated>
<author>
<name>Jiri Slaby (SUSE)</name>
<email>jirislaby@kernel.org</email>
</author>
<published>2023-12-06T07:36:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=359bbdc0cdfc8504c617f7a00af959a17277d4f4'/>
<id>urn:sha1:359bbdc0cdfc8504c617f7a00af959a17277d4f4</id>
<content type='text'>
Switch character types to u8 and sizes to size_t. To conform to
characters/sizes in the rest of the tty layer.

Signed-off-by: "Jiri Slaby (SUSE)" &lt;jirislaby@kernel.org&gt;
Cc: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Cc: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
Cc: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Cc: Sven Schnelle &lt;svens@linux.ibm.com&gt;
Cc: linux-s390@vger.kernel.org
Link: https://lore.kernel.org/r/20231206073712.17776-9-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: con3215: drop raw3215_info::ubuffer</title>
<updated>2023-11-23T19:16:03Z</updated>
<author>
<name>Jiri Slaby (SUSE)</name>
<email>jirislaby@kernel.org</email>
</author>
<published>2023-11-21T10:36:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5592d7e87f239708dc90011d9cf35726657be861'/>
<id>urn:sha1:5592d7e87f239708dc90011d9cf35726657be861</id>
<content type='text'>
clang-struct [1] found raw3215_info::ubuffer unused.

It's actually not used since 2004 when we switched to kernel buffers.

[1] https://github.com/jirislaby/clang-struct

Signed-off-by: "Jiri Slaby (SUSE)" &lt;jirislaby@kernel.org&gt;
Cc: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Cc: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
Cc: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Cc: Sven Schnelle &lt;svens@linux.ibm.com&gt;
Cc: linux-s390@vger.kernel.org
Acked-by: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20231121103626.17772-2-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: make tty_operations::write()'s count size_t</title>
<updated>2023-08-11T19:12:46Z</updated>
<author>
<name>Jiri Slaby (SUSE)</name>
<email>jirislaby@kernel.org</email>
</author>
<published>2023-08-10T09:15:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=95713967ba52389f7cea75704d0cf048080ec218'/>
<id>urn:sha1:95713967ba52389f7cea75704d0cf048080ec218</id>
<content type='text'>
Unify with the rest of the code. Use size_t for counts and ssize_t for
retval.

Signed-off-by: "Jiri Slaby (SUSE)" &lt;jirislaby@kernel.org&gt;
Link: https://lore.kernel.org/r/20230810091510.13006-30-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: propagate u8 data to tty_operations::put_char()</title>
<updated>2023-08-11T19:12:46Z</updated>
<author>
<name>Jiri Slaby (SUSE)</name>
<email>jirislaby@kernel.org</email>
</author>
<published>2023-08-10T09:15:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=dcaafbe6ee3b39f2df11a1352f85172f8ade17a5'/>
<id>urn:sha1:dcaafbe6ee3b39f2df11a1352f85172f8ade17a5</id>
<content type='text'>
Data are now typed as u8. Propagate this change to
tty_operations::put_char().

Signed-off-by: "Jiri Slaby (SUSE)" &lt;jirislaby@kernel.org&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Cc: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
Cc: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Cc: Sven Schnelle &lt;svens@linux.ibm.com&gt;
Cc: Karsten Keil &lt;isdn@linux-pingi.de&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Jiri Slaby &lt;jirislaby@kernel.org&gt;
Cc: Shawn Guo &lt;shawnguo@kernel.org&gt;
Cc: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Cc: Pengutronix Kernel Team &lt;kernel@pengutronix.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: NXP Linux Team &lt;linux-imx@nxp.com&gt;
Cc: Mathias Nyman &lt;mathias.nyman@intel.com&gt;
Link: https://lore.kernel.org/r/20230810091510.13006-29-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: propagate u8 data to tty_operations::write()</title>
<updated>2023-08-11T19:12:46Z</updated>
<author>
<name>Jiri Slaby (SUSE)</name>
<email>jirislaby@kernel.org</email>
</author>
<published>2023-08-10T09:15:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=69851e4ab8feeb369119a44ddca430c0ee15f0d8'/>
<id>urn:sha1:69851e4ab8feeb369119a44ddca430c0ee15f0d8</id>
<content type='text'>
Data are now typed as u8. Propagate this change to
tty_operations::write().

Signed-off-by: "Jiri Slaby (SUSE)" &lt;jirislaby@kernel.org&gt;
Cc: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Cc: Ivan Kokshaysky &lt;ink@jurassic.park.msu.ru&gt;
Cc: Matt Turner &lt;mattst88@gmail.com&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: Richard Weinberger &lt;richard@nod.at&gt;
Cc: Anton Ivanov &lt;anton.ivanov@cambridgegreys.com&gt;
Cc: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Cc: Chris Zankel &lt;chris@zankel.net&gt;
Cc: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Vaibhav Gupta &lt;vaibhavgupta40@gmail.com&gt;
Cc: Jens Taprogge &lt;jens.taprogge@taprogge.org&gt;
Cc: Karsten Keil &lt;isdn@linux-pingi.de&gt;
Cc: Scott Branden &lt;scott.branden@broadcom.com&gt;
Cc: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Jakub Kicinski &lt;kuba@kernel.org&gt;
Cc: Paolo Abeni &lt;pabeni@redhat.com&gt;
Cc: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Cc: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
Cc: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Cc: Sven Schnelle &lt;svens@linux.ibm.com&gt;
Cc: David Lin &lt;dtwlin@gmail.com&gt;
Cc: Johan Hovold &lt;johan@kernel.org&gt;
Cc: Alex Elder &lt;elder@kernel.org&gt;
Cc: Laurentiu Tudor &lt;laurentiu.tudor@nxp.com&gt;
Cc: Jiri Kosina &lt;jikos@kernel.org&gt;
Cc: David Sterba &lt;dsterba@suse.com&gt;
Cc: Shawn Guo &lt;shawnguo@kernel.org&gt;
Cc: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Cc: Pengutronix Kernel Team &lt;kernel@pengutronix.de&gt;
Cc: Fabio Estevam &lt;festevam@gmail.com&gt;
Cc: NXP Linux Team &lt;linux-imx@nxp.com&gt;
Cc: Arnaud Pouliquen &lt;arnaud.pouliquen@foss.st.com&gt;
Cc: Oliver Neukum &lt;oneukum@suse.com&gt;
Cc: Mathias Nyman &lt;mathias.nyman@intel.com&gt;
Cc: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Cc: Johan Hedberg &lt;johan.hedberg@gmail.com&gt;
Cc: Luiz Augusto von Dentz &lt;luiz.dentz@gmail.com&gt;
Link: https://lore.kernel.org/r/20230810091510.13006-28-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>s390: include linux/io.h instead of asm/io.h</title>
<updated>2023-07-03T09:19:40Z</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2023-06-22T08:46:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b378a982614360686f45c3e6b63fd5d1acd02d08'/>
<id>urn:sha1:b378a982614360686f45c3e6b63fd5d1acd02d08</id>
<content type='text'>
Include linux/io.h instead of asm/io.h everywhere. linux/io.h includes
asm/io.h, so this shouldn't cause any problems. Instead this might help for
some randconfig build errors which were reported due to some undefined io
related functions.

Also move the changed include so it stays grouped together with other
includes from the same directory.

For ctcm_mpc.c also remove not needed comments (actually questions).

Acked-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Alexander Gordeev &lt;agordeev@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>tty: Cleanup tty_port_set_initialized() bool parameter</title>
<updated>2023-01-19T15:04:34Z</updated>
<author>
<name>Ilpo Järvinen</name>
<email>ilpo.jarvinen@linux.intel.com</email>
</author>
<published>2023-01-17T09:03:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=515be7baeddb04d786e3a7f4072791087c25bb04'/>
<id>urn:sha1:515be7baeddb04d786e3a7f4072791087c25bb04</id>
<content type='text'>
Make callers pass true/false consistently for bool val.

Reviewed-by: Samuel Iglesias Gonsalvez &lt;siglesias@igalia.com&gt;
Reviewed-by: Jiri Slaby &lt;jirislaby@kernel.org&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230117090358.4796-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>s390/con3215: Fix white space errors</title>
<updated>2022-10-26T12:46:51Z</updated>
<author>
<name>Thomas Richter</name>
<email>tmricht@linux.ibm.com</email>
</author>
<published>2022-09-20T14:33:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=55af33fdec50a9a88f0dc0f8b898db7399e32645'/>
<id>urn:sha1:55af33fdec50a9a88f0dc0f8b898db7399e32645</id>
<content type='text'>
Adjust white space according to coding guidelines.

Signed-off-by: Thomas Richter &lt;tmricht@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/con3215: Drop console data printout when buffer full</title>
<updated>2022-10-26T12:46:51Z</updated>
<author>
<name>Thomas Richter</name>
<email>tmricht@linux.ibm.com</email>
</author>
<published>2022-09-20T12:26:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1f3307cf3aac88763077fac90404f2c57bc5181a'/>
<id>urn:sha1:1f3307cf3aac88763077fac90404f2c57bc5181a</id>
<content type='text'>
Using z/VM the 3270 terminal emulator also emulates an IBM 3215 console
which outputs line by line. When the screen is full, the console enters
the MORE... state and waits for the operator to confirm the data
on the screen by pressing a clear key. If this does not happen in the
default time frame (currently 50 seconds) the console enters the HOLDING
state.
It then waits another time frame (currently 10 seconds) before the output
continues on the next screen. When the operator presses the clear key
during these wait times, the output continues immediately.

This may lead to a very long boot time when the console
has to print many messages, also the system may hang because of the
console's limited buffer space and the system waits for the console
output to drain and finally to finish. This problem can only occur
when a terminal emulator is actually connected to the 3215 console
driver. If not z/VM simply drops console output.

Remedy this rare situation and add a kernel boot command line parameter
con3215_drop. It can be set to 0 (do not drop) or 1 (do drop) which is
the default. This instructs the kernel drop console data when the
console buffer is full. This speeds up the boot time considerable and
also does not hang the system anymore.

Add a sysfs attribute file for console IBM 3215 named con_drop.
This allows for changing the behavior after the boot, for example when
during interactive debugging a panic/crash is expected.

Here is a test of the new behavior using the following test program:
 #/bin/bash
 declare -i cnt=4

 mode=$(cat /sys/bus/ccw/drivers/3215/con_drop)
 [ $mode = yes ] &amp;&amp; cnt=25

 echo "cons_drop $(cat /sys/bus/ccw/drivers/3215/con_drop)"
 echo "vmcp term more 5 2"
 vmcp term more 5 2
 echo "Run $cnt iterations of "'echo t &gt; /proc/sysrq-trigger'

 for i in $(seq $cnt)
 do
	echo "$i. command 'echo t &gt; /proc/sysrq-trigger' at $(date +%F,%T)"
	echo t &gt; /proc/sysrq-trigger
	sleep 1
 done
 echo "droptest done" &gt; /dev/kmsg
 #

Output with sysfs attribute con_drop set to 1:
 # ./droptest.sh
 cons_drop yes
 vmcp term more 5 2
 Run 25 iterations of echo t &gt; /proc/sysrq-trigger
 1. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:09
 2. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:10
 3. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:11
 4. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:12
 5. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:13
 6. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:14
 7. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:15
 8. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:16
 9. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:17
 10. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:18
 11. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:19
 12. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:20
 13. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:21
 14. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:22
 15. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:23
 16. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:24
 17. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:25
 18. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:26
 19. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:27
 20. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:28
 21. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:29
 22. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:30
 23. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:31
 24. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:32
 25. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:15:33
 #

There are no hangs anymore.

Output with sysfs attribute con_drop set to 0 and identical
setting for z/VM console 'term more 5 2'. Sometimes hitting the
clear key at the x3270 console to progress output.

 # ./droptest.sh
 cons_drop no
 vmcp term more 5 2
 Run 4 iterations of echo t &gt; /proc/sysrq-trigger
 1. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:20:58
 2. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:24:32
 3. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:28:04
 4. command 'echo t &gt; /proc/sysrq-trigger' at 2022-09-02,10:31:37
 #

Details:
Enable function raw3215_write() to handle tab expansion and newlines
and feed it with input not larger than the console buffer of 65536
bytes. Function raw3125_putchar() just forwards its character for
output to raw3215_write().

This moves tab to blank conversion to one function raw3215_write()
which also does call raw3215_make_room() to wait for enough free
buffer space.

Function handle_write() loops over all its input and segments input
into chunks of console buffer size (should the input be larger).

Rework tab expansion handling logic to avoid code duplication.

Signed-off-by: Thomas Richter &lt;tmricht@linux.ibm.com&gt;
Acked-by: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;
Acked-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
</content>
</entry>
</feed>
