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

Re: [PATCH v4 3/3] ns16550: Gate all PCI code with CONFIG_X86


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Fri, 27 Nov 2020 14:25:08 +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=WqpGUJM4S9eQHH5Ot9fLaepfAzqGMbuWwOB0pNJ9QQY=; b=Oc1TaJ9GoxrQaRHzt5t8RdgiMUQ6w2/cfvlZzf+mC8DdGG9N7AuFJUtD8wqLhtkdG/76Es+Tz018H0c3INv9k7X/2flTVaTEoM5PfdBUUIKWVkHHEXOVOy+oNvIrKyPokBEv6l9K0nwXHDL42pbJsH3GJ4VUpfQzsT54/unu0DTNd/kkOlqn3BaexSC6+uNbXaMOPqc3sL4lNwve9uyhEjZcPk8t8qJBmSS3MduFnKIC1ZuURDzOZ53uKqF0iry23dRN+C4TlFC/b0/4J7kh2ud6XxaTB4zMJYFNIuCViTCPkQ9xndGQTo05A8pfgLAsDRZSo30mYbYLVpsXExFMeA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=edMmVdpIo6qrSjJOS8wgXzcM3GFaUJf6OgVAih+4jKPZRQ7ayz/kRy6Sa8jV/oW3mIU0NVr8QHP1ka7hGoebX7p15CMRJHlAP2MeGGYk02Qg5RXlPosSqGzsixXzRUTsC7+HwTOjeE4OMObhGIxJSsddbgY8GYmNL2YXm5E7x1D4JJ8BdDAAlGKr5eej2MpINQVY5mhJlpBsi8clVJBPKKgVnGxyEMA0ODhjObcmXWgGlRki4RnLLN/Un/xkttwtpJxhPAG3gn/n/EhvAPIxNt/S8S5jnykHh+0rZxW8LrP/uiAjBlNzCldBdnh1eONiTbXZh96mEoDjQM7foYgFvQ==
  • 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: Fri, 27 Nov 2020 14:25:34 +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: AQHWw1cvjUPnGDPA302zQ9SdCrcARancBA0AgAAHeoA=
  • Thread-topic: [PATCH v4 3/3] ns16550: Gate all PCI code with CONFIG_X86

Hello Jan,

> On 27 Nov 2020, at 1:58 pm, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 25.11.2020 19:16, Rahul Singh wrote:
>> --- 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
>> +#if defined(CONFIG_X86) && defined(CONFIG_HAS_PCI)
>> #include <xen/pci.h>
>> #include <xen/pci_regs.h>
>> #include <xen/pci_ids.h>
>> @@ -51,7 +51,7 @@ static struct ns16550 {
>>     unsigned int timeout_ms;
>>     bool_t intr_works;
>>     bool_t dw_usr_bsy;
>> -#ifdef CONFIG_HAS_PCI
>> +#if defined(CONFIG_X86) && defined(CONFIG_HAS_PCI)
> 
> I'm sorry to be picky, but this being a hack wants, imo, also calling
> it so, by way of a code comment. Clearly this should go at one of the
> first instances, yet neither of the two above are really suitable imo.
> Hence I'm coming back to my prior suggestion of introducing a
> consolidated #define without this becoming a Kconfig setting:
> 
> /*
> * The PCI part of the code in this file currently is only known to
> * work on x86. Undo this hack once the logic has been suitably
> * abstracted.
> */
> #if defined(CONFIG_HAS_PCI) && defined(CONFIG_X86)
> # define NS16550_PCI
> #endif
> 
> And then use NS16550_PCI everywhere. I'd be fine making this
> adjustment while committing, if I knew that (a) you're okay with it
> and

Thanks for reviewing the code.I am ok with it.

> (b) the R-b and A-b you've already got can be kept.
> 
> Jan
> 




 


Rackspace

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