[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 1/9] drivers/char: separate dbgp=xhci to dbc=xhci option


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 6 Sep 2022 08:58:01 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jG0zk3SlbjRhX+881sK3vMg9u6tDIRC6tb39swUTrwk=; b=m6RJ7MLAskp+BK/lKwVewGOZysiuUI4mHNusmax7UYLu0ezsRssNOADdJc4/YSakDBgLv1HJL5cKEGVALBaRoD8SYWgextLf4+pWcCFdMtp3uQMdjE8jIqfx9mudVEi8MTIhEw+5DS1H+iLhC9f/OQsx3F0I87eb8wVRHExVwexk+8zFUEu5PY3aEu0GFeKvFwVYAjEjDyZQ7G/96FVpycYuiRA4Etytqj6u1EX8UiU74Ou0vRYcLSteLnQQxcfMJousJkJRh+Nh9CeHODvUP5cktGpV0x3mDnkoSqktoIAtvyl7aYyI/LRRWtSRii9nqTwLhEQuTUHdzo94yj+DsQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KwnZB3AOwDTA6J5lXpyf7UN7ScSBAdoSZVCC9ajB9LQm30jHCPH5crkKBgGW4tUnHtq7AVAZqI8v6lzlJYaWfz6lgfuCwLF301xEAuwp/VzG+hL3VSX5U26Z2jrKBM9Hvsq5hp1FnOPEjCxb8xWQzq/BAc2dsf6GjpPYBY2JiLA0qg5jqDCl29meEMneG8EwMk6x09qwRz8AGo2/R/+peaAVSBjrvXxVXL1nSvCmMQHqaD0XcPhl8yIHyjiQaJTAqv8Tf9FLFQT5ue5YkaIYEdhnQgcWpbpYorM8yUI/9TkoxATjfL4THd+h6VcbvLFeu5w0k3+vKJQ9iagYQCP+QQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 06 Sep 2022 06:58:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 29.08.2022 13:57, Marek Marczykowski-Górecki wrote:
> On Mon, Aug 29, 2022 at 01:49:30PM +0200, Marek Marczykowski-Górecki wrote:
>> On Fri, Aug 26, 2022 at 04:20:52PM +0200, Jan Beulich wrote:
>>> On 26.08.2022 13:46, Marek Marczykowski-Górecki wrote:
>>>> On Thu, Aug 25, 2022 at 05:44:54PM +0200, Jan Beulich wrote:
>>>>> On 22.08.2022 17:27, Marek Marczykowski-Górecki wrote:
>>>>>> This allows configuring EHCI and XHCI consoles separately,
>>>>>> simultaneously.
>>>>>>
>>>>>> Suggested-by: Jan Beulich <jbeulich@xxxxxxxx>
>>>>>
>>>>> But was I maybe confused, and much less of a change would suffice? After
>>>>> all ...
>>>>>
>>>>>> --- a/xen/drivers/char/xhci-dbc.c
>>>>>> +++ b/xen/drivers/char/xhci-dbc.c
>>>>>> @@ -1058,9 +1058,9 @@ static struct xhci_dbc_ctx ctx __aligned(16);
>>>>>>  static uint8_t out_wrk_buf[DBC_WORK_RING_CAP];
>>>>>>  static struct xhci_string_descriptor str_buf[DBC_STRINGS_COUNT];
>>>>>>  
>>>>>> -static char __initdata opt_dbgp[30];
>>>>>> +static char __initdata opt_dbc[30];
>>>>>>  
>>>>>> -string_param("dbgp", opt_dbgp);
>>>>>> +string_param("dbc", opt_dbc);
>>>>>>  
>>>>>>  void __init xhci_dbc_uart_init(void)
>>>>>>  {
>>>>>> @@ -1068,25 +1068,25 @@ void __init xhci_dbc_uart_init(void)
>>>>>>      struct dbc *dbc = &uart->dbc;
>>>>>>      const char *e;
>>>>>>  
>>>>>> -    if ( strncmp(opt_dbgp, "xhci", 4) )
>>>>>> +    if ( strncmp(opt_dbc, "xhci", 4) )
>>>>>>          return;
>>>>>
>>>>> ... this already avoids mixing up who's going to parse what. So right
>>>>> now I think that ...
>>>>>
>>>>>> @@ -1102,7 +1102,7 @@ void __init xhci_dbc_uart_init(void)
>>>>>>      dbc->dbc_str = str_buf;
>>>>>>  
>>>>>>      if ( dbc_open(dbc) )
>>>>>> -        serial_register_uart(SERHND_DBGP, &dbc_uart_driver, &dbc_uart);
>>>>>> +        serial_register_uart(SERHND_DBC, &dbc_uart_driver, &dbc_uart);
>>>>>>  }
>>>>>
>>>>> ... this and other SERHND_* related changes are enough, and there's no
>>>>> need for a separate "dbc=" option.
>>>>
>>>> But then you wouldn't be able to configure "dbgp=ehci dbgp=xhci" as
>>>> one would override the other, no?
>>>
>>> Not as long as both use string_param(), true. They'd need to both become
>>> custom_param(), doing at least some basic parsing right away.
>>>
>>> But using two such options at the same time isn't of interest anyway
>>> without your multiple-serial-consoles change, so possibly not of
>>> immediate need (unless someone comes forward expressing interest and
>>> actually approving that change of yours).
>>
>> Then why change at all? Since you can configure only one (dbgp=ehci _or_
>> dbgp=xhci), then there is not ambiguity what "console=dbgp" means.
>> Separating SERHND_DBC from SERHND_DBGP would IMO make sense only if you
>> can actually use them both (even if not both for console, but for
>> example one for debugger).
> 
> Or do you mean to use custom_param() to actually make "dbgp=xhci
> dbgp=ehci" working?

Yes.

> But then IMO having "console=dbgp console=dbc" would
> be confusing, as "dbc" has no obvious relation to neither side of
> "dbgp=xhci".

Well, there was never any idea of using multiple serial consoles, so
the present "console=dbgp" doesn't provide room for telling apart the
two. Just like there's no way to tell apart two EHCI controllers'
debug ports both (intended to be) used at the same time.

JanMaybe use "console=xhci" then?
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.