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

Re: [XEN RFC PATCH 04/40] xen/arm: return default DMA bit width when platform is not set


  • To: Wei Chen <Wei.Chen@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 13 Aug 2021 08:56:00 +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-SenderADCheck; bh=bCzRmmkQnWmJojPOPOlxiAyqEbOUIZf/WSJPKdTenkE=; b=JyCOpRi95onrRt90U4aMQ4nRAmf7dXy0COE4BpZ8yL6yrAOcP4BehiJKbPeUwBvdaqSB4n/YwJN5BUHlq3aqNlYKmmZQnsJnr2LUFDqMGtz4BygSbr5qp1j0xuW9wu7qSvTQLrqxd9LX+M6sSbbz50rLFx0j7DZJQ/gdi6NotD04pLtcvpRDgmlyrPUliFDXDd/sUNLJbR56bN6RjfyNUh8eV7xOHBN1G7Gm48r5YcPYv1X9BmjrQndITc5DGpM8XLtzIBnvAaRI/Gv+KUMOdDLTCvjFB/Fd6oTsXrq9mv4iyMKqMKT1DAgHYvCqM3NIHoLjsEOS22gZMRL+5OqinQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BqygkNx4u5O3c1TqMjxIQS/XFxSUi/DGeas3u9jNxT4UxwDe4ogW4G0EODiIHZ0x+aCvRMktxEU0aCrhnDgsvHZULAqzxa9zVQUuhqwESGbONuqQzLjPR6Tjax0bf729+DxeYd+JK08bJr8b6PtwqWaHiG+6tASE9UrtTkLBN45UCHAElSJBYEX4kpCYKM74oUoYncHamhRVJsot9dVh614GaXAev9/pxndFhnPTCVZjVb0Q51CrFmmJnZ13Yqr6NszUvqgFond0vmplHKzM33964I2BL90NMamoGMJ+QNFJiXHZsYjhI9QMkOhL1SJcLpiuRm6Tuxl3agoMtWe/lQ==
  • Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=suse.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>
  • Delivery-date: Fri, 13 Aug 2021 06:56:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13.08.2021 08:54, Wei Chen wrote:
>> From: Jan Beulich <jbeulich@xxxxxxxx>
>> Sent: 2021年8月11日 18:54
>>
>> On 11.08.2021 12:23, Wei Chen wrote:
>>> --- a/xen/arch/arm/platform.c
>>> +++ b/xen/arch/arm/platform.c
>>> @@ -27,6 +27,7 @@ extern const struct platform_desc _splatform[],
>> _eplatform[];
>>>  /* Pointer to the current platform description */
>>>  static const struct platform_desc *platform;
>>>
>>> +extern unsigned int dma_bitsize;
>>
>> This is a no-go: Declarations need to live in a header which the producer
>> and all consumers include. Else ...
> 
> Ok, I will place it to a header.
> 
>>
>>> --- a/xen/common/page_alloc.c
>>> +++ b/xen/common/page_alloc.c
>>> @@ -227,7 +227,7 @@ static bool __read_mostly scrub_debug;
>>>   * Bit width of the DMA heap -- used to override NUMA-node-first.
>>>   * allocation strategy, which can otherwise exhaust low memory.
>>>   */
>>> -static unsigned int dma_bitsize;
>>> +unsigned int dma_bitsize;
>>
>> ... a change here (of e.g. the type) will go unnoticed by the compiler,
>> and the consumer of the variable may no longer work correctly.
>>
> 
> Sorry, I am not very clear about this comment.

I've merely been trying to explain _why_ the declaration needs to be
in a header.

Jan




 


Rackspace

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