aboutsummaryrefslogtreecommitdiff
path: root/slof
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2020-03-26 11:32:43 +0100
committerAlexey Kardashevskiy <aik@ozlabs.ru>2020-03-27 11:55:00 +1100
commit76fee95890f7a80665a7cdb5eff73d064c141453 (patch)
tree8f13f44d059257470f6a7e783ea74b66c330e926 /slof
parentab6984f5a6d054e1f634dda855b32e5357111974 (diff)
downloadSLOF-76fee95890f7a80665a7cdb5eff73d064c141453.zip
SLOF-76fee95890f7a80665a7cdb5eff73d064c141453.tar.gz
SLOF-76fee95890f7a80665a7cdb5eff73d064c141453.tar.bz2
slof: Only close stdout for virtio-serial devices
Recent commit cf28264196e5 fixed an issue where a virtio-serial device wouldn't shutdown properly during quiesce. The fix is to close stdout just before quiesce. As expected this causes some messages to not appear anymore, like the well known ones from prom_init(): Quiescing Open Firmware ... Booting Linux via __start() @ 0x0000000002000000 ... Actually all messages are discarded until the OS driver finally takes control of the device, which may represent a fair amount of logging. This is suboptimal but this still better than hanging in SLOF. The hammer is a bit too big though because the change also affects spapr-vty based consoles, which have no reason to stop working after quiesce. Move the hack from the common code to the virtio-serial code so that it doesn't affect other device types anymore. Register a quiesce hook that closes stdout in virtio-serial.fs. While here, as suggested by Segher, bring back some robustness in the shutdown method. Reported-by: Fabiano Rosas <farosas@linux.ibm.com> Fixes: cf28264196e5 "virtio-serial: Rework shutdown sequence" Signed-off-by: Greg Kurz <groug@kaod.org> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'slof')
-rw-r--r--slof/fs/client.fs5
1 files changed, 0 insertions, 5 deletions
diff --git a/slof/fs/client.fs b/slof/fs/client.fs
index 76231f9..db7a192 100644
--- a/slof/fs/client.fs
+++ b/slof/fs/client.fs
@@ -203,11 +203,6 @@ ALSO client-voc DEFINITIONS
\ End of life of SLOF now, call platform quiesce as quiesce
\ is an undocumented extension and not everybody supports it
close-dev
- \ Some device, eg. virtio-serial, need all instances to be
- \ closed in order to be reset properly
- s" stdout" get-chosen IF
- decode-int nip nip close-dev
- THEN
quiesce
ELSE
close-dev