summaryrefslogtreecommitdiffstats
path: root/drivers/tty/hvc/hvc_console.h
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2018-05-01 00:55:57 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2018-07-23 20:13:20 +1000
commit9f65b81f36e31563c5a5e4df3b3b8bc7550b6030 (patch)
treea4e3e295eba020c1f68072d40733cdb57f543e84 /drivers/tty/hvc/hvc_console.h
parent550ddadcc7580ec2a6c22d4ed04291bc6e2428fb (diff)
downloadop-kernel-dev-9f65b81f36e31563c5a5e4df3b3b8bc7550b6030.zip
op-kernel-dev-9f65b81f36e31563c5a5e4df3b3b8bc7550b6030.tar.gz
tty: hvc: introduce the hv_ops.flush operation for hvc drivers
Use .flush to wait for drivers to flush their console outside of the spinlock, to reduce lock/irq latencies. Flush the hvc console driver after each write, which can help messages make it out to the console after a crash. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/tty/hvc/hvc_console.h')
-rw-r--r--drivers/tty/hvc/hvc_console.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/hvc/hvc_console.h b/drivers/tty/hvc/hvc_console.h
index ea63090..e931995 100644
--- a/drivers/tty/hvc/hvc_console.h
+++ b/drivers/tty/hvc/hvc_console.h
@@ -54,6 +54,7 @@ struct hvc_struct {
struct hv_ops {
int (*get_chars)(uint32_t vtermno, char *buf, int count);
int (*put_chars)(uint32_t vtermno, const char *buf, int count);
+ int (*flush)(uint32_t vtermno, bool wait);
/* Callbacks for notification. Called in open, close and hangup */
int (*notifier_add)(struct hvc_struct *hp, int irq);
OpenPOWER on IntegriCloud