• Nicholas Piggin's avatar
    powerpc/powernv: Remove OPALv1 support from opal console driver · b74d2807
    Nicholas Piggin authored
    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: default avatarNicholas Piggin <npiggin@gmail.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    b74d2807
opal.c 26 KB