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

Re: [PATCH v3] ns16550: enable memory decoding on MMIO-based PCI console card


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 8 May 2023 11:01:18 +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=8zg/eu4y+GGpwMvhH3GrfsmAH38DH55fmk8Qi+m0M+w=; b=GOEjCXb3x+DBzX1OoesCnFda/u3uf1SOuo5+a1jFH5VUSs1ROZxh4Qb0Gd6xh3D6ENNnvPdBOsTTTdqB8F9iLI90r44nEAXEb4REaBd9llVjoU09r2i7trW1TlFI/+9c9t//t5b9yDFt7E7cPBoEn1Z2dEPlJ+KOHcai/f1Op7rQfhbXztTpvi6yj3vmQQdHXqmY72jiPT74A4bFl2qh1mIqdl/86namLdKD5ATI87MBnWlGDoUH/za04ryJbclZz7RGxOdN0gjzDvz6Bo/wDGKSgtYLP9BSvw2efjFMW1uhocLvP0CbgWxyBttrHBtH+56NRwTrNXzsvgToFTeZiA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jKPQS3CSGm5j+Ov/BNyzfGf9DAZyYfSk0BbwErMLvK4c0UoFHrbiRcBFbL4cd0kB6204mGEC3Uq5Qdnq/VnvKxbL6a1k7lc6mhcccDCojzCnXGrfDcMqC9N1lNq1Rw55GZ59TdBcsrZ0bTW1JEOT8MRpqI2Kpfm2g4nc8D7bvqgXFOkCWJH+Dgtb+offIeXI2ZAZmSlNRKal9DY6QLYJ/VMl+PJ/zdi+88XONYK2x1Hhf3YlEROSO2SWqh7yib/4QBTWwWsbtA39cwBu5huUZLBkFfnZJsv2b0nH66YZX9Ld77V6uWG3xKwzCOhVGxNPJWW+3+6N7yhuKfeEsqw5AQ==
  • 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: Mon, 08 May 2023 09:01:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 05.05.2023 23:48, Marek Marczykowski-Górecki wrote:
> pci_serial_early_init() enables PCI_COMMAND_IO for IO-based UART
> devices, add setting PCI_COMMAND_MEMORY for MMIO-based UART devices too.
> Note the MMIO-based devices in practice need a "pci" sub-option,
> otherwise a few parameters are not initialized (including bar_idx,
> reg_shift, reg_width etc). The "pci" is not supposed to be used with
> explicit BDF, so do not key setting PCI_COMMAND_MEMORY on explicit BDF
> being set. Contrary to the IO-based UART, pci_serial_early_init() will
> not attempt to set BAR0 address, even if user provided io_base manually
> - in most cases, those are with an offest and the current cmdline syntax
> doesn't allow expressing it. Due to this, enable PCI_COMMAND_MEMORY only
> if uart->bar is already populated. In similar spirit, this patch does
> not support setting BAR0 of the bridge.
> 
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
with ...

> --- a/xen/drivers/char/ns16550.c
> +++ b/xen/drivers/char/ns16550.c
> @@ -272,6 +272,14 @@ static int cf_check ns16550_getc(struct serial_port 
> *port, char *pc)
>  static void pci_serial_early_init(struct ns16550 *uart)
>  {
>  #ifdef NS16550_PCI
> +    if ( uart->bar && uart->io_base >= 0x10000)

... (nit) the missing blank inserted, which I'll be happy to do while
committing.

Jan



 


Rackspace

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