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

Re: [PATCH] tools: Move MASK_INSR to common-macros.h


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Luca Fancellu <luca.fancellu@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 9 Jun 2023 11:31:56 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=p3zI9Mh/x5ZJX9Vk3bxj5HHqfaHgpWBbNS0I8Uu63V4=; b=MBxE8pO7pv/M5P9jtQFRXjZqbTxG/A/e0CWN9LCNtdjmzsvuvYsaMy9J/gqj3jgcYDTdRV6M5LDMAjdFloxikze1cARkJAEqfh4CvG1ObBd+RWiKEC8L0uTm5qFeXuG994Uv6qa1pfyxp+xn3T2lgQFja2qjdaX17Hskr2p766Pd700idcElF8ESC7fT0a2464bFJk2v53tK+rplHxpLjHWa7ceTucIJRrrKxNf1Rjg3UcZoSupADTjlAIO6/UqTdSR/OJcZT5C8pXxBVoNH3LcOj6ULu/uXjwdJXiOFrf7PPuSxCgwyZWhYxKhxVq3J0VXYQG5kLi6rusvxxWz40A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JwrW3AylT+RhJv7TZQA5zdEDmKJsy6HDiekZdVn5cd6tZZEDRjV7N09l/v903jM2SDEjE8yNs0UMhZ5C1nSg6QUNEQRtDnHCk7653z4yWv8Zjt3d71BRJ4MOQdcz5BhRtnYktpTGL9aH5InoZX07lXbrB0cWy+V8yZAI68T5taTOrenLyixmqujF0yLibtqk8Sw6mS2UOw9xquV6qcry5F/kddzg2vvvlJ1ZhMp6naykSWFj29/Q10PA4cZZs5mB5VG+d1ijegZhjidS6ONTHsmw54LUrvRiH6xLnEt7ibLBH+BupC7PiX38kTh2df8DoH7cgMUAgAMqN8a2CAKR0A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 09 Jun 2023 09:32:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 08.06.2023 19:40, Andrew Cooper wrote:
> MASK_EXTR() and MASK_INSR() are a matching pair.  Keep them together.

Right, that's one thing which should have been done right away.
The other is that both macros should have been purged from
tools/tests/x86_emulator/x86-emulate.h (which includes
xen-tools/common-macros.h). Luca?

Jan

> Fixes: 56a7aaa16bfe ("tools: add physinfo arch_capabilities handling for Arm")
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
> CC: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> CC: Juergen Gross <jgross@xxxxxxxx>
> CC: Luca Fancellu <luca.fancellu@xxxxxxx>
> ---
>  tools/include/xen-tools/common-macros.h | 1 +
>  tools/libs/light/libxl_internal.h       | 2 --
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tools/include/xen-tools/common-macros.h 
> b/tools/include/xen-tools/common-macros.h
> index d53b88182560..168691be0e93 100644
> --- a/tools/include/xen-tools/common-macros.h
> +++ b/tools/include/xen-tools/common-macros.h
> @@ -73,6 +73,7 @@
>  #endif
>  
>  #define MASK_EXTR(v, m) (((v) & (m)) / ((m) & -(m)))
> +#define MASK_INSR(v, m) (((v) * ((m) & -(m))) & (m))
>  
>  #ifndef __must_check
>  #define __must_check __attribute__((__warn_unused_result__))
> diff --git a/tools/libs/light/libxl_internal.h 
> b/tools/libs/light/libxl_internal.h
> index 8aba3e138909..61f4fe1dec55 100644
> --- a/tools/libs/light/libxl_internal.h
> +++ b/tools/libs/light/libxl_internal.h
> @@ -132,8 +132,6 @@
>  
>  #define DIV_ROUNDUP(n, d) (((n) + (d) - 1) / (d))
>  
> -#define MASK_INSR(v, m) (((v) * ((m) & -(m))) & (m))
> -
>  #define LIBXL__LOGGING_ENABLED
>  
>  #ifdef LIBXL__LOGGING_ENABLED




 


Rackspace

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