[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: Fri, 26 Aug 2022 16:20:52 +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=ih1Hv3IMS6Rbb5dYKNA+5UooZq3X83Pxpj6Zg7tMwaI=; b=MVDGOvYRhlY2vx8My1ZFoicTIJblbY6ey8jnEbWvjTPx+dwqa7sx8pxRezFVQsJ12Qd1zDYsjMTMOgVzPeD+kWdJUJqGJxxeG78ToIPrRzkW8b3mCvWPpURSPZK6NHrELao50fDdEMXAtJ6NuP0jLMub7aAuDhKKaTOgbRa+xnhncMuTURLA5l2docyfSnpjARBdJPhYqmLtJzkLDX0XG7YBgrXjGBQjaHsgRQ/LSpGf+wc93BjtMAjZZ0FbW7LHgYsFeoyYOyyNW6ooTsvuXZ6dADr0DzBITC2c+iN+QG2ClC6d2UBf+7JhPV1/LUlZW+RpiBdNw/TdlFEoRTTjRw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cnRp3NtBRD4wn1+sYDeTsqYws/LH8HwdwER27yTJqVmoj5mmg6dV/4k5qkp3gE/pMeqrdsHV6QJBinx2940BYq+yhsnrDeeXrq8st4M/F4dh4WPCXpuOK3cmYCKiTWjwgBp3m1x5IEgloUkw6ot7xBhcZ4tEm61eclN/hbXlEU6/hUPXQmjLZmu0W08UfXcTg8HOn+8QXVRaq2ekjUxA6Rl1lOtravYqG7b3IncH+uMCSBKSsQLfNftXWOM8vxZ9XgTQXldb2YYMOdQsoTzbLw91r36ZRCwgOIVU/KD5RRtfidzvkYvZKcIH8vSLw1T/YK6hgzbZV7L72wqVYKB06A==
  • 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: Fri, 26 Aug 2022 14:21:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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).

Jan



 


Rackspace

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