Re: [PATCH v6 1/4] tools/init-xenstore-domain: Replace variable MB() usage

2024-04-04 Thread Jason Andryuk
On 2024-04-04 06:09, Jan Beulich wrote: On 27.03.2024 22:50, Jason Andryuk wrote: @@ -36,6 +35,11 @@ static xc_evtchn_port_or_error_t console_evtchn; static xentoollog_level minmsglevel = XTL_PROGRESS; static void *logger; +static inline uint64_t mb_to_bytes(int mem) +{ + return

Re: [PATCH v6 1/4] tools/init-xenstore-domain: Replace variable MB() usage

2024-04-04 Thread Jan Beulich
On 27.03.2024 22:50, Jason Andryuk wrote: > @@ -36,6 +35,11 @@ static xc_evtchn_port_or_error_t console_evtchn; > static xentoollog_level minmsglevel = XTL_PROGRESS; > static void *logger; > > +static inline uint64_t mb_to_bytes(int mem) > +{ > + return (uint64_t)mem << 20; > +} While

Re: [PATCH v6 1/4] tools/init-xenstore-domain: Replace variable MB() usage

2024-04-03 Thread Jason Andryuk
On 2024-04-03 08:41, Anthony PERARD wrote: On Wed, Mar 27, 2024 at 05:50:59PM -0400, Jason Andryuk wrote: The local MB() & GB() macros will be replaced with a common implementation, but those only work with constant values. Introduce a By the way, this is not true, the macro introduce in the

Re: [PATCH v6 1/4] tools/init-xenstore-domain: Replace variable MB() usage

2024-04-03 Thread Anthony PERARD
On Wed, Mar 27, 2024 at 05:50:59PM -0400, Jason Andryuk wrote: > The local MB() & GB() macros will be replaced with a common > implementation, but those only work with constant values. Introduce a By the way, this is not true, the macro introduce in the following patch ("tools: Move MB/GB() to

[PATCH v6 1/4] tools/init-xenstore-domain: Replace variable MB() usage

2024-03-27 Thread Jason Andryuk
The local MB() & GB() macros will be replaced with a common implementation, but those only work with constant values. Introduce a static inline mb_to_bytes() in place of the MB() macro to convert the variable values. Signed-off-by: Jason Andryuk --- v4: New ---