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

Re: [Xen-devel] [PATCH v3 07/10] xen/nodemask: Drop nodes_{setall, clear}() and improve the initialisers


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Wed, 31 Jul 2019 13:12:46 +0000
  • Accept-language: en-US
  • 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=KadQbO3H0TC3rIl5vamgujG2J6f9w99huopOR2Gx7NQ=; b=K7eEViS0D8+I7zQ8saiKhoJFfMOfQaywU6RnkHaRfBlSVQ/o5dtzmGKVqjt3JcvJczN3FW3C8xHcKP1jkqAdAeUNztv8LA+VAkI4wjc5cRq8YDsPhyqPnADRTV02KrezdWjuE8efgzLs4bTms8gHCNIA9yG7mCkp5G5Ul+Gxnq9pAJJE9yGwoswiFSDe3XGI6hra7E+jx3xivwZytO4flb3b5WlWeyIoRf5F0lylPi6wqkZ+tai78IC+hVdrb3xbE40OAvUirCHZkX2PhJqbmjrnc4XNmX4wcOtwZ7qUHzLoxVPoEeTHJMRLaqvp9xiuTdOfJgCS84Me0fPoIrtG7g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cxje10bx7b2GUIts7EbFSb382bXfEBtwI4X0AnW/0XxAWbfFaUqABbQ4NgspoJ5by44uwAFrYuchT32cIXVxW/v6kdIKaK/LnDOTJqCingr/Re0nAbaj6usXu0vdYO7hiWv+in8HZcM+brsbEIJaMOczQi5AMbr4ez09OxvOEnr6JoYQrcLxeEgbIR4VqPED2QOiM5pdmhIVQioAKYm3o4/N1GCsMdqWSGXQpOnPL2+s6TwIhsYpsYfwPxJZV5kn8j8dd9jjqUJy4b44pOXIyVJyQw7dhi3eHzdy1EqD/BgXUjNAesbeq73hYuUKsXvLgkV95U7nwJttvSLwUaoqvw==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: StefanoStabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 31 Jul 2019 13:26:14 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVR56HyQB8QNXYGkOiux3yNaWDSqbktAgA
  • Thread-topic: [Xen-devel] [PATCH v3 07/10] xen/nodemask: Drop nodes_{setall, clear}() and improve the initialisers

On 31.07.2019 14:49, Andrew Cooper wrote:
> I don't see a way to avoid expanding node twice, but given that its wrapper 
> is in ALL_CAPS and obviously a macro.
> 
> Furthermore, experimenting with a deliberate attempt to provoke this, I got
> 
> numa.c: In function ‘numa_initmem_init’:
> 
> /local/xen.git/xen/include/xen/nodemask.h:90:10: error: nonconstant array 
> index in initializer
> 
>           [(node) / BITS_PER_LONG] = 1UL << ((node) % BITS_PER_LONG)      \
> 
>            ^
> 
> numa.c:274:23: note: in expansion of macro ‘NODEMASK_OF’
> 
>       node_online_map = NODEMASK_OF(foo++);
> 
>                         ^~~~~~~~~~~
> 
> /local/xen.git/xen/include/xen/nodemask.h:90:10: note: (near initialization 
> for ‘(anonymous).bits’)
> 
>           [(node) / BITS_PER_LONG] = 1UL << ((node) % BITS_PER_LONG)      \
> 
>            ^
> 
> numa.c:274:23: note: in expansion of macro ‘NODEMASK_OF’
> 
>       node_online_map = NODEMASK_OF(foo++);
> 
>                         ^~~~~~~~~~~
> 
> from GCC 6.3, which I think covers everything we need, and will prevent side 
> effects from double expansion in practice.

Ah, right. With this my R-b applies to the change as is (with the
additional adjustments folded in that you've pointed out).

Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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