From: Jan Beulich <JBeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: StefanoStabellini <sstabellini@kernel.org>,
"Wei Liu" <wl@xen.org>, "Julien Grall" <julien.grall@arm.com>,
Xen-devel <xen-devel@lists.xenproject.org>,
"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH v3 07/10] xen/nodemask: Drop nodes_{setall, clear}() and improve the initialisers
Date: Wed, 31 Jul 2019 13:12:46 +0000 [thread overview]
Message-ID: <0ec79656-2132-441e-99c6-2fcfb842ff99@suse.com> (raw)
In-Reply-To: <88cead08-46ab-7623-c01a-adfd7267e9e1@citrix.com>
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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-07-31 13:26 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-29 12:11 [Xen-devel] [PATCH v3 00/10] xen/nodemask: API cleanup and fixes Andrew Cooper
2019-07-29 12:11 ` [Xen-devel] [PATCH v3 01/10] page-alloc: Clamp get_free_buddy() to online nodes Andrew Cooper
2019-07-29 15:48 ` Jan Beulich
2019-07-29 17:26 ` Andrew Cooper
2019-07-30 8:09 ` Jan Beulich
2019-07-30 17:32 ` Andrew Cooper
2019-07-31 8:22 ` Jan Beulich
2019-07-31 9:01 ` Andrew Cooper
2019-07-29 12:11 ` [Xen-devel] [PATCH v3 02/10] xen/bitmap: Drop {bitmap, cpumask, nodes}_shift_{left, right}() Andrew Cooper
2019-07-29 15:50 ` Jan Beulich
2019-07-29 12:11 ` [Xen-devel] [PATCH v3 03/10] xen/nodemask: Drop any_online_node() and first_unset_node() Andrew Cooper
2019-07-29 15:51 ` Jan Beulich
2019-07-29 12:11 ` [Xen-devel] [PATCH v3 04/10] xen/mask: Convert {cpu, node}mask_test() to be static inline Andrew Cooper
2019-07-30 8:52 ` Jan Beulich
2019-07-30 9:03 ` Andrew Cooper
2019-07-29 12:11 ` [Xen-devel] [PATCH v3 05/10] xen/cpumask: Introduce a CPUMASK_PR() wrapper for printing Andrew Cooper
2019-07-30 8:55 ` Jan Beulich
2019-07-29 12:12 ` [Xen-devel] [PATCH v3 06/10] xen/nodemask: Introduce a NODEMASK_PR() " Andrew Cooper
2019-07-30 8:58 ` Jan Beulich
2019-07-30 9:09 ` Andrew Cooper
2019-07-29 12:12 ` [Xen-devel] [PATCH v3 07/10] xen/nodemask: Drop nodes_{setall, clear}() and improve the initialisers Andrew Cooper
2019-07-30 9:44 ` Jan Beulich
2019-07-31 12:49 ` Andrew Cooper
2019-07-31 13:12 ` Jan Beulich [this message]
2019-07-31 13:32 ` Andrew Cooper
2019-07-29 12:12 ` [Xen-devel] [PATCH v3 08/10] xen/nodemask: Introduce unlocked __nodemask_{set, clear}() helpers Andrew Cooper
2019-07-30 11:26 ` Jan Beulich
2019-07-30 17:48 ` Andrew Cooper
2019-07-31 8:41 ` Jan Beulich
2019-07-29 12:12 ` [Xen-devel] [PATCH v3 09/10] xen/nodemask: Sanitise the remainder of the nodemask API Andrew Cooper
2019-07-30 11:43 ` Jan Beulich
2019-07-29 12:12 ` [Xen-devel] [PATCH v3 10/10] xen/nodemask: Drop remaining refeces to linux Andrew Cooper
2019-07-30 11:44 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0ec79656-2132-441e-99c6-2fcfb842ff99@suse.com \
--to=jbeulich@suse.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=julien.grall@arm.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.