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

Re: [PATCH v3 1/3] xen/ns16550: Make ns16550 driver usable on ARM with HAS_PCI enabled.


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Wed, 18 Nov 2020 15:02:20 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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-SenderADCheck; bh=hflZgAY4mwAQTVn16eHtaha3nLKmp0IAc9gq4XPv7Yo=; b=IxC42BiFMyPjtTpHwggCFN9qYV5AhuqI5nEccBaucxwT+qVoU3C/YV/tftZG/1TeoRql1+8fgLTQOMSM9BDLT/maC4bZiOGIxyJCaxmpsy04/Y5V9IVPiaGKzvHZ0PhAACx7hEK5xFbl2mmWj9fNvKiimfnSUI4vvWgZpib9Po2LV9ufvXtCex7MgpD5UXCfDGyOWAn+3J0HyqiiHm76yjZpM1YxP9GC1kl2AItXrvnZC1BJhiBpL3Y93HpJVgISy8tSB/kcFUyaHpQArGOI8gm96h5pc58vvHt7noe0YWjgiz01QCtlb4Wk5a4NqvtwNb7P6c7lqowLZxBubAbt0g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ry14ttndkwA0bGzTpqTHZ8Hs8/OYSj/Z37wX7ZcGVWIIyO/S5qZhrIj0PthpMi0HARIkNJofEjMCG6YLMXwfB2SQIL1k9WpuoQL5uWbquEPGcMBEUOZTiQFB6Ixw2Kh5Bj+MArT0808ZmZuxaEEb33bx6paNp8kpzFt9g0X0vS2XWbAEFacvM6QisXK57Gz8GALFhOS6iwMV6SKli4yh6L2rYjGjRtmRBCO9b0CMYgRCYnONbypHENopra/2xD+l6rEgIzQAeCW6H1KFQxFtk/UEHgHbdoQwfppuI01Lv64wPZHh3gxC71vY6KviIbi9l4fU8ERmJc54CNTEkbdr3A==
  • Authentication-results-original: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 18 Nov 2020 15:03:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHWvBOve/67EvsNk0ODGsWoVvEIcanMKDEAgAHXRoA=
  • Thread-topic: [PATCH v3 1/3] xen/ns16550: Make ns16550 driver usable on ARM with HAS_PCI enabled.

Hello Jan,

> On 17 Nov 2020, at 10:55 am, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 16.11.2020 13:25, Rahul Singh wrote:
>> NS16550 driver has PCI support that is under HAS_PCI flag. When HAS_PCI
>> is enabled for ARM, compilation error is observed for ARM architecture
>> because ARM platforms do not have full PCI support available.
> 
> While you've extended the sentence, it remains unclear to me what
> compilation error it is that results here. I've requested such
> clarification for v2 already.

Compilation error is related to the code that refer to x86  functions 
(create_irq()..) and MSI implementation related error. 
For more details please find the attached file for compilation error.

> 
>> --- a/xen/drivers/char/Kconfig
>> +++ b/xen/drivers/char/Kconfig
>> @@ -4,6 +4,10 @@ config HAS_NS16550
>>      help
>>        This selects the 16550-series UART support. For most systems, say Y.
>> 
>> +config HAS_NS16550_PCI
>> +    def_bool y
>> +    depends on X86 && HAS_NS16550 && HAS_PCI
> 
> Looking at this again (in particular at all the #ifdef changes in
> the actual source file), I wonder whether an approach with less
> code churn and without such an extra Kconfig setting (with, as
> said, a bogus dependency on x86) couldn't be found. For example,
> how about ...
> 
>> --- a/xen/drivers/char/ns16550.c
>> +++ b/xen/drivers/char/ns16550.c
>> @@ -16,7 +16,7 @@
>> #include <xen/timer.h>
>> #include <xen/serial.h>
>> #include <xen/iocap.h>
>> -#ifdef CONFIG_HAS_PCI
>> +#ifdef CONFIG_HAS_NS16550_PCI
>> #include <xen/pci.h>
>> #include <xen/pci_regs.h>
>> #include <xen/pci_ids.h>
> 
> ... #undef-ining CONFIG_HAS_PCI at a suitable position in this
> file (e.g. after all #include-s, to make sure all structure
> layouts remain correct)? This would then be far easier to revert
> down the road, and would confine the oddity to a single file
> (and there a single place) in the code base.
> 

As for ARM platforms, PCI implementation is in the development process and I am 
not sure if after completion of PCI work, ns16500 PCI part of code will work 
out of the box. I think there is some effort required to test the ns16550 PCI 
part of the code on ARM.
As this code is tested on X86 only so I make the options depends on X86 and 
enable it by default for x86.  

I feel that adding a new Kconfig options is ok to enable/disable the PCI 
NS16550 support as compared to #undef CONFIG_HAS_PCI in the particular file. If 
in future other architecture wants to implement the PCI they will face the 
similar compilation error issues.

Please suggest how we can proceed on this.


> Jan

Regards,
Rahul

Attachment: compilation error.rtf
Description: compilation error.rtf


 


Rackspace

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