* Patch "powerpc/powernv: Fix OPAL_CONSOLE_FLUSH prototype and usages" has been added to the 4.4-stable tree
@ 2016-03-12 7:04 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-03-12 7:04 UTC (permalink / raw)
To: ruscur, gregkh, mpe; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
powerpc/powernv: Fix OPAL_CONSOLE_FLUSH prototype and usages
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
powerpc-powernv-fix-opal_console_flush-prototype-and-usages.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From c88c5d43732a0356f99e5e4d1ad62ab1ea516b81 Mon Sep 17 00:00:00 2001
From: Russell Currey <ruscur@russell.cc>
Date: Wed, 13 Jan 2016 12:04:32 +1100
Subject: powerpc/powernv: Fix OPAL_CONSOLE_FLUSH prototype and usages
From: Russell Currey <ruscur@russell.cc>
commit c88c5d43732a0356f99e5e4d1ad62ab1ea516b81 upstream.
The recently added OPAL API call, OPAL_CONSOLE_FLUSH, originally took no
parameters and returned nothing. The call was updated to accept the
terminal number to flush, and returned various values depending on the
state of the output buffer.
The prototype has been updated and its usage in the OPAL kmsg dumper has
been modified to support its new behaviour as an incremental flush.
Signed-off-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/include/asm/opal.h | 2 +-
arch/powerpc/platforms/powernv/opal-kmsg.c | 9 ++++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
--- a/arch/powerpc/include/asm/opal.h
+++ b/arch/powerpc/include/asm/opal.h
@@ -35,7 +35,7 @@ int64_t opal_console_read(int64_t term_n
uint8_t *buffer);
int64_t opal_console_write_buffer_space(int64_t term_number,
__be64 *length);
-void opal_console_flush(void);
+int64_t opal_console_flush(int64_t term_number);
int64_t opal_rtc_read(__be32 *year_month_day,
__be64 *hour_minute_second_millisecond);
int64_t opal_rtc_write(uint32_t year_month_day,
--- a/arch/powerpc/platforms/powernv/opal-kmsg.c
+++ b/arch/powerpc/platforms/powernv/opal-kmsg.c
@@ -27,6 +27,7 @@ static void force_opal_console_flush(str
enum kmsg_dump_reason reason)
{
int i;
+ int64_t ret;
/*
* Outside of a panic context the pollers will continue to run,
@@ -36,7 +37,13 @@ static void force_opal_console_flush(str
return;
if (opal_check_token(OPAL_CONSOLE_FLUSH)) {
- opal_console_flush();
+ ret = opal_console_flush(0);
+
+ if (ret == OPAL_UNSUPPORTED || ret == OPAL_PARAMETER)
+ return;
+
+ /* Incrementally flush until there's nothing left */
+ while (opal_console_flush(0) != OPAL_SUCCESS);
} else {
/*
* If OPAL_CONSOLE_FLUSH is not implemented in the firmware,
Patches currently in stable-queue which might be from ruscur@russell.cc are
queue-4.4/powerpc-powernv-add-a-kmsg_dumper-that-flushes-console-output-on-panic.patch
queue-4.4/powerpc-powernv-fix-opal_console_flush-prototype-and-usages.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-03-12 7:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-12 7:04 Patch "powerpc/powernv: Fix OPAL_CONSOLE_FLUSH prototype and usages" has been added to the 4.4-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).