Thread (6 messages) 6 messages, 4 authors, 2010-03-23

Re: Virtio_console usage of early printk

From: Christian Borntraeger <hidden>
Date: 2010-03-23 08:18:05

Am Dienstag 23 M=E4rz 2010 03:16:20 schrieb Amit Shah:
On (Mon) Mar 22 2010 [18:45:47], Fran=E7ois Diakhate wrote:
quoted
the console. Does the attached patch seem valid ? Feedback from s390
and powerpc users who use this functionality would be appreciated.
=20
Looks OK to me, Christian, others, could you comment on this please?
Looks good and boot tested with kuli on s390.

Acked-by: Christian Borntraeger <redacted>
quoted
From 3961f380bbe84a1036ddfc823039cbee31b44dcb Mon Sep 17 00:00:00 2001
From: =3D?utf-8?q?Fran=3DC3=3DA7ois=3D20Diakhat=3DC3=3DA9?=3D <fdiakh@g=
mail.com>
quoted
Date: Thu, 18 Mar 2010 14:48:20 +0100
Subject: virtio: console: Fix early_put_chars usage
=20
Currently early_put_chars is not used by virtio_console because it can =
only be used once a port has been found, at which point it's too late becau=
se it is no longer needed. This patch should fix it.
quoted
---
 drivers/char/virtio_console.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
=20
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_consol=
e.c
quoted
index f404ccf..691ba21 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -645,13 +645,13 @@ static int put_chars(u32 vtermno, const char *buf=
, int count)
quoted
 {
 	struct port *port;
=20
+	if (unlikely(early_put_chars))
+		return early_put_chars(vtermno, buf, count);
+
 	port =3D find_port_by_vtermno(vtermno);
 	if (!port)
 		return 0;
=20
-	if (unlikely(early_put_chars))
-		return early_put_chars(vtermno, buf, count);
-
 	return send_buf(port, (void *)buf, count);
 }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help