On 25/11/15 14:26, Russell Currey wrote:
On BMC machines, console output is controlled by the OPAL firmware and is
only flushed when its pollers are called.  When the kernel is in a panic
state, it no longer calls these pollers and thus console output does not
completely flush, causing some output from the panic to be lost.

This patch adds a new kmsg_dumper which gets called at panic time to ensure
panic output is not lost.  It accomplishes this by calling OPAL_CONSOLE_FLUSH
in the OPAL API, and if that is not available, the pollers are called enough
times to (hopefully) completely flush the buffer.

As per our off-list discussions, the commit message should explain that the console is already flushed upon reboot, and thus this patch fixes a problem in the case where the kernel is not set to reboot on panic, or will only reboot after an extended delay. Additionally, you could still miss messages printed in panic() after the dumpers are called, i.e. the "end kernel panic" message.


Signed-off-by: Russell Currey <rus...@russell.cc>

The code looks reasonable.

With the changes I've mentioned above:

Reviewed-by: Andrew Donnellan <andrew.donnel...@au1.ibm.com>

--
Andrew Donnellan              Software Engineer, OzLabs
andrew.donnel...@au1.ibm.com  Australia Development Lab, Canberra
+61 2 6201 8874 (work)        IBM Australia Limited

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to