lkml.org 
[lkml]   [2009]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] virtio_console: Add support for multiple ports for generic guest and host communication
Date
Am Mittwoch 30 September 2009 19:13:21 schrieb Amit Shah:
> - uses port->id instead of a static hvc_vtermno to pass on a value to
> hvc_alloc(). Motivation explained within comments in the code.

[...]
> + * The first argument of hvc_alloc() is the virtual console
> + * number. hvc_alloc() checks if a console with the same value
> + * was used in hvc_instantiate(). We may not end up passing
> + * the same value here (we use the value 0 in
> + * hvc_instantiate() but the console port may not be at id
> + * 0). This isn't a problem, though. Nothing in hvc really
> + * depends on these numbers and since this number is passed on
> + * to us when cons_get/put_chars() is called, it's preferable
> + * to pass on the port->id so that we can get the port struct
> + * via get_port_from_id().
[...]
> + port->hvc = hvc_alloc(port->id, 0, &virtio_cons, PAGE_SIZE);

I am not sure if this is going to be ok.

When I change the old code (without your patch) to use vtermno=0 in
hvc_instantiate and vtermno=1 in hvc_alloc I get
"Warning: unable to open an initial console."

It seems to me that we have to pass the same values.

Christian


\
 
 \ /
  Last update: 2009-10-01 11:05    [W:0.115 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site