[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: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 17 May 2022 17:13:46 +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=s/LPmWU8cNPJ02nq5CuvfOIZKx5d6armEq33dNkYfaM=; b=isIZyR139l1aPVe7XnAuW8CF5AAi7H9FqVP5xr4jxVUmnAkhVyP7TJ1x8ZfT7TUvib+JadT4KeLPcP3BQdzVvqco1IQU/FX9NbdZwExoBxzj/UIFhRaOv53yUcZy1mUpgyWWH++07UYCHLwehfG3Yj7BxtNzsoLZwNbPED5tYLLFzwg+SfRUyX/J8FMM2l2aGLMxC8Nlz83Hgr+xD7Cmtd8Sg70FwXF3hSJzOPFCMNhOE5M8kbcGZnTZ1FOjGEyoGi7mLZZ7M8oKIUqgc44AKeWqJvSOQ0fN7nDuMw4I3G5HZT2uzV9Sea9mpfKxTxuQPWaD4L7JsNo/tTkeRosLPw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VebXLeGJNDDajadR3QjmJib3Daa+ay3U1PwMj+mttzKrqf44Gd7gh+UevvbEXClbasrdYsyCeyOYC5G2mHjaL0tKRpWb2NLct1k/hVDzcj44sfE1jKr+n/q0EMNecYyeGTx4bFIwejGZI6vD9dq+vSWAquAi0jeSAI1T6Xhq2DylLZp0LqRsUrVyT9q+I21iSE2UPdcWzEqqPr4gD5SvQ/nultgWvCKLEb6YMb7/axg8WPMQOvu5LcFsZOFz6kct08FbPBV1J8zZ4dBIMo5heWR4OsALlMCxOLbvN3BF/ntIyPq4lFh0rAbwI9lQ1LFRrtDz8Aja+hJwzCyAd5D8fg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, 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 15:14:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.05.2022 16:48, Roger Pau Monné wrote:
> On Tue, May 17, 2022 at 04:41:31PM +0200, Jan Beulich wrote:
>> 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.
> 
> The CONFIG_HAS_PCI region is itself inside of a (bigger) CONFIG_X86
> region already.

But that's likely to change sooner or later, I expect. I'd rather see
the surrounding region be shrunk in scope. Already when that
CONFIG_X86 was introduced I had reservations, as I don't think all of
the enclosed code really is x86-specific.

Jan




 


Rackspace

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