All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ben Guthro <ben@guthro.net>
Cc: linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com
Subject: Re: [Xen-devel] [PATCH] xen/hvc: Fix polling mode to work with kdb/kgdb
Date: Thu, 7 Jun 2012 12:40:34 -0400	[thread overview]
Message-ID: <20120607164034.GQ9472@phenom.dumpdata.com> (raw)
In-Reply-To: <CAOvdn6VWdOy1nNM+x3ogCCFXy8FExZjTJaV-s6SR7kbGu+REOA@mail.gmail.com>

On Thu, Jun 07, 2012 at 09:30:06AM -0400, Ben Guthro wrote:
> Fix the polling section of the hvc driver to use the global "last_hvc"
> variable, rather than the ttys.

Could you just do:

       struct tty_struct *tty = driver->ttys[last_hvc];

as well? So how come the '0' one did not work? Is that b/c
of console=tty becoming '0' instead of hvc0? Is there a crash
involved with this? Or is that it just is listening on the
wrong console (and which one is that?)
> 
> With this change debugging a xen dom0 kernel is possible via the
> following kernel parameter:
> kgdboc=hvc0

Hm, if that is the problem then this should also be a problem on
IBM Power boxes I would think?

> 
> Signed-off-by: Ben Guthro <Benjamin.Guthro@citrix.com>
> 
> 
> 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@lists.xen.org
> http://lists.xen.org/xen-devel

  reply	other threads:[~2012-06-07 16:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-07 13:30 [PATCH] xen/hvc: Fix polling mode to work with kdb/kgdb Ben Guthro
2012-06-07 16:40 ` Konrad Rzeszutek Wilk [this message]
2012-06-07 17:34   ` [Xen-devel] " Ben Guthro
2012-06-07 17:48     ` Konrad Rzeszutek Wilk
2012-06-07 18:03       ` Ben Guthro
2012-06-07 18:01         ` Konrad Rzeszutek Wilk
2012-06-07 20:07           ` Ben Guthro
2012-06-08 13:13             ` Ben Guthro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120607164034.GQ9472@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=ben@guthro.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.