[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] [PATCH] xen/hvc: Fix polling mode to work with kdb/kgdb
- To: linux-kernel@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx
- From: Ben Guthro <ben@xxxxxxxxxx>
- Date: Thu, 7 Jun 2012 09:30:06 -0400
- Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
- Delivery-date: Thu, 07 Jun 2012 13:30:23 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=xw5qWuzEwBB4UaIFSh4Jgwecv+yQxVjIHD9NYVZgXmo=; b=staJSwLXkm3R4MjSow8BOLQVbixjOH/RqQqAIkBMneHb+I83dfT9yN2iOQ8i+8eIOY GE0tYpxxf3RK6+GoGisDibU1PPXCcwmyYdFOQ6+rrzTLki2dwOeJIADA8WeJUNvAkUDa iT1e44Zgk4m+WKpgWVMTB2oa6oZbvG0GHSARsYh8/gHdDBUwzO+9vMUkVNALFQY71FUo DSpkJEvgspIKBfAzxKQK6Qsu3HcFsdYFNdXld7JN83UZeKnZl4e8rnBUlR3nP9OX6dNA we/DmJayPNO3JIJ210o/nzX9xJhjt9Nd/bHzOE55WNV5m88NAAZwAj8MTXSOAMa7cVRF LNyg==
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
Fix the polling section of the hvc driver to use the global "last_hvc"
variable, rather than the ttys.
With this change debugging a xen dom0 kernel is possible via the
following kernel parameter:
kgdboc=hvc0
Signed-off-by: Ben Guthro <Benjamin.Guthro@xxxxxxxxxx>
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index 2d691eb..3750e74 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
@@ -766,12 +766,10 @@ int hvc_poll_init(struct tty_driver *driver, int
line, char *options)
static int hvc_poll_get_char(struct tty_driver *driver, int line)
{
- struct tty_struct *tty = driver->ttys[0];
- struct hvc_struct *hp = tty->driver_data;
int n;
char ch;
- n = hp->ops->get_chars(hp->vtermno, &ch, 1);
+ n = cons_ops[last_hvc]->get_chars(vtermnos[last_hvc], &ch, 1);
if (n == 0)
return NO_POLL_CHAR;
@@ -781,12 +779,10 @@ static int hvc_poll_get_char(struct tty_driver
*driver, int line)
static void hvc_poll_put_char(struct tty_driver *driver, int line, char ch)
{
- struct tty_struct *tty = driver->ttys[0];
- struct hvc_struct *hp = tty->driver_data;
int n;
do {
- n = hp->ops->put_chars(hp->vtermno, &ch, 1);
+ n = cons_ops[last_hvc]->put_chars(vtermnos[last_hvc], &ch, 1);
} while (n <= 0);
}
#endif
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel