OSDN Git Service

powerpc/powernv: Implement and use opal_flush_console
authorNicholas Piggin <npiggin@gmail.com>
Mon, 30 Apr 2018 14:55:48 +0000 (00:55 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 24 Jul 2018 12:09:56 +0000 (22:09 +1000)
commitd2a2262e686ce7a27776add27751f925ceda856f
tree4dff5a937882a3c9d596eacbcf3eae31ab8c94b8
parente00da0f2db91b90e990cc05088f03adbc58af895
powerpc/powernv: Implement and use opal_flush_console

A new console flushing firmware API was introduced to replace event
polling loops, and implemented in opal-kmsg with affddff69c55e
("powerpc/powernv: Add a kmsg_dumper that flushes console output on
panic"), to flush the console in the panic path.

The OPAL console driver has other situations where interrupts are off
and it needs to flush the console synchronously. These still use a
polling loop.

So move the opal-kmsg flush code to opal_flush_console, and use the
new function in opal-kmsg and opal_put_chars.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/opal.h
arch/powerpc/platforms/powernv/opal-kmsg.c
arch/powerpc/platforms/powernv/opal.c