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

Re: [PATCH v6 1/2] ns16550: use poll mode if INTERRUPT_LINE is 0xff


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 20 May 2022 11:47:02 +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=g5r7iEN+48pW6ircr7WYXa1NE7WzPMOpEtcbzM3LXYs=; b=X7+AGaqh2YXCDD7pL3HPzCOj3NmmDofA3yatSAuxmgh7QgeIcSgL3PEN0e9hX+OciAt5/nGxpmqkpyedxqyzSA1aJsdtYn+B0LtvZi+gGkN2gPSITgAiZLQTahZ9UECx9wuKNHlgJ7nHRXI/2kmRhgpCtNce9fgY76TAiw2aIgfISQH7PAuBj/4MIsTXFwEjRELBWdpYgfLjHdLrNRJXAshUVGRBrjilfQg+63oWpbAyIYTv/4jK2pPkNghMqqzDEJlIjH7vOBXxxxK7UbtRMSKSB38+gwo2sCzplYfgvpy67KDagG1Yx2dTrbIPrl6FFmxVnWlfNiN1D4dPpBhqkQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EOCKLyvlAykeuY0BlJCo2JnocwSi2mQER6Rx+/LNJzxY7wHUgE3vJGWW86ZX1g1rzn+ak/iRQBQbDqjWLkFBh86yq4iGyWH2/Wh3sgmNnvDXk62nZpkkpHfWGLN0bSP3b3HQb81SB7qxd5sbq4G4uJFQJkhE8DeQrx7uQiUl7oY7mzTFQkpw5ndm/LEz6DxsdHbxf+90oHXJQYt+PNzzMPQT9Y1n6Tghf4h1xZNbx3gDWoBVBOtw1r5kg7Ov38/okJNSfB9a4D2st7yOe6Cx9HbB7cEVU3ubhkPJR1Z2m6c16lRCIll+Au4qeOLILhtyBPbqzDuMBeVrzU7Qhynd8Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, 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, 20 May 2022 09:47:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 20.05.2022 10:53, Marek Marczykowski-Górecki wrote:
> Intel LPSS has INTERRUPT_LINE set to 0xff by default, that is declared
> by the PCI Local Bus Specification Revision 3.0 (from 2004) as
> "unknown"/"no connection". Fallback to poll mode in this case.
> The 0xff handling is x86-specific, the surrounding code is guarded with
> CONFIG_X86 anyway.
> 
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

> Changes in v6:
>  - wrap the check in additional CONFIG_X86, with appropriate comment

Thanks, albeit ...

> --- a/xen/drivers/char/ns16550.c
> +++ b/xen/drivers/char/ns16550.c
> @@ -1238,6 +1238,17 @@ pci_uart_config(struct ns16550 *uart, bool_t skip_amt, 
> unsigned int idx)
>                              pci_conf_read8(PCI_SBDF(0, b, d, f),
>                                             PCI_INTERRUPT_LINE) : 0;
>  
> +#ifdef CONFIG_X86
> +                /* PCI Local Bus Specification Revision 3.0 defines 0xff 
> value
> +                 * as special only for X86 */

... I'll have to remember to correct the style of the comment while
committing ...

> +                if ( uart->irq == 0xff )
> +                    uart->irq = 0;
> +#endif
> +                if ( !uart->irq )
> +                    printk(XENLOG_INFO
> +                           "ns16550: %pp no legacy IRQ, using poll mode\n",

... and perhaps insert another colon after %pp here.

Jan

> +                           &PCI_SBDF(0, b, d, f));
> +
>                  return 0;
>              }
>          }




 


Rackspace

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