]> asedeno.scripts.mit.edu Git - linux.git/commit
powerpc/powernv: Remove OPALv1 support from opal console driver
authorNicholas Piggin <npiggin@gmail.com>
Mon, 30 Apr 2018 14:55:49 +0000 (00:55 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 24 Jul 2018 12:09:56 +0000 (22:09 +1000)
commitb74d2807ae0cdb17ccc45d22260fc151a1b2d46b
treeb4f8659b0e1d45279535cd1a4db6fcb6dada559d
parentd2a2262e686ce7a27776add27751f925ceda856f
powerpc/powernv: Remove OPALv1 support from opal console driver

opal_put_chars deals with partial writes because in OPALv1,
opal_console_write_buffer_space did not work correctly. That firmware
is not supported.

This reworks the opal_put_chars code to no longer deal with partial
writes by turning them into full writes. Partial write handling is still
supported in terms of what gets returned to the caller, but it may not
go to the console atomically. A warning message is printed in this
case.

This allows console flushing to be moved out of the opal_write_lock
spinlock. That could cause the lock to be held for long periods if the
console is busy (especially if it was being spammed by firmware),
which is dangerous because the lock is taken by xmon to debug the
system. Flushing outside the lock improves the situation a bit.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/opal.c