[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: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Fri, 27 Nov 2020 14:16:07 +0000
  • Accept-language: en-GB, 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=W0lKqdAxGV52KUnfN/GqFWuaEaMQkLORmFiAeJApcIQ=; b=nD4rlL53D1vCW9mkwPmjKwojUXt+yyE/dxYJGOZFHnjeTz7aFylK88NmSZsiuvVkS4BlM530Z1RI9x6hoUDlZJFtJC9fNQGXLo6Cn4GYw8PsVQ9Ld5ygqYs0tzXVA6ACuv/nAvDK92rMgNDfEvh8Q/Lf/N6YuRWYCJqLIjoYUCi/eDYXMOcKc+7jt77kidn2v3EHCBiXuSKeuuXdOMXRIZ0ceyRvL8FVNmXrmies8W8x4gm5CS0y6RcChp3GUzPRYbyrL+mHRRzl6xZ71oV+ImgGpTIKjlWBJnuZG8Km7wZBDrEHlfdGrJr6IfyKUkeQjBPTz7RNJbgF6xdkHHjXww==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q3Ojk0qwf0TjDwXTritXeAoQsb9dnHqwh0S0d1hXLc/sBh2Zz2R54nmape5DmbzvCUkbU7qKuGm5WDIF0CRkVAPFqIYtCO/a8TtTMk2Aa16gQ8aIuYJ756NyTp3Wcr6aOas3BT47YZD3o98io6vQKZ9XpQ0sFyQDOAvUwSkKiUOcwKPE0RuQtCm/8RtXG7BtqK11vxdADoqEfUgWsTvWiJO2GoNzOWwHC29kygudl7uCt0XCWhwgx+SUJJoFJbewkeHdVIhGD7IzQn7rZV0GQmDd4WeCBrdqC7wgy2HqNCN2wD9PpB/65yGKHJshS6gyqjy429gBc1FeAmPzizPN8A==
  • Authentication-results-original: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Cc: Rahul Singh <Rahul.Singh@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:16:36 +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: AQHWw1cvptOzj+DOhEKKe2XksTlGiKncBA0AgAAE9oA=
  • Thread-topic: [PATCH v4 3/3] ns16550: Gate all PCI code with CONFIG_X86

Hi Jan,

> On 27 Nov 2020, at 13:58, 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 (b) the R-b and A-b you've already got can be kept.
> 

Sounds ok to me so you can keep my R-b if you go this way.

Cheers
Bertrand

> Jan
> 




 


Rackspace

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