[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 1/2] ns16550: use poll mode if INTERRUPT_LINE is 0xff
- To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Tue, 17 May 2022 16:41:31 +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=CjuqExjHmiiQyXdM22MReiWUF1qDVgY1XrCkTbHvGk8=; b=J3crcJBcAndy3iT+Ns4wdQ580f5GWUEfUuYdV8LX8OahqGlc7WqkzbYzHdoebwQwojuPdQ0cbXkDxJD1n66F6364G31yPnNVr7RxbDXfe3pxgjT79bK0v02RaBio7p4yjLAIEiMjd+qOqfYJPEL9Xekt+bsCJDvv+FcI0L9KkPFbhQ1vc+PxX3mcRkFJwiPY/NSNaln4qfRS7JFPXTnhUaBeDcL4F0vat379kYzMrNZBTic1eDbNWt0YijZ6FsMgGMUT2AoJ21KqzPFgY2Ev2SGuVhrcDv0a/le4ClpUH3AC2y1fAB9GMdfXlVx9m9z89hiZ8zdfJzpePp3p6cIbZg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kV7f+xqXeJ8Wp43TK5PmOkKHJyR/UE1VGQ/+wpzyZ2Yehftf8XdZ4mXDKelblWY7xdJmnc8C79XNkPhd+3r6Yo4CygYpYZbr6qUv2f5ddsA184sGxyGKNZ5cZDpUqwbxQdmQzE2l9RP+KKSwPjDjg4CGGC5wV6E3R3l1ZPiOa4Rb6dTzy8Bm3JsTIiYdyHnYWcQnCdllSeQpZKT8GMohO1RBiElysm7ItwqWL5vJDEVnAfMpOl42WcW1q0i1fWsA7oJHcwaPQIAjHLFPmhJiHffYBECyBZsAL5egKvetizcZ3A471PIGAQURepxkTwgOgbbNvE4UHrSuoVVIAMKHvQ==
- 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: Tue, 17 May 2022 14:41:40 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 11.05.2022 16:30, Marek Marczykowski-Górecki wrote:
> --- a/xen/drivers/char/ns16550.c
> +++ b/xen/drivers/char/ns16550.c
> @@ -1238,6 +1238,13 @@ 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;
>
> + if ( uart->irq == 0xff )
> + uart->irq = 0;
> + if ( !uart->irq )
> + printk(XENLOG_INFO
> + "ns16550: %pp no legacy IRQ, using poll mode\n",
> + &PCI_SBDF(0, b, d, f));
> +
> return 0;
> }
> }
While this code is inside a CONFIG_HAS_PCI conditional, I still
think - as was previously suggested - that the 1st if() should be
inside a CONFIG_X86 conditional, to not leave a trap for other
architectures to fall into.
Jan
|