tools: Move MASK_INSR to common-macros.h
PATCH 1/1 tools: Move MASK_INSR to common-macros.h
MASK_EXTR() and MASK_INSR() are a matching pair. Keep them together.
Drop the pair from x86-emulate.h which includes common-macros.h.
---
CC: Anthony PERARD <[email protected]>
CC: Juergen Gross <[email protected]>
CC: Luca Fancellu <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>
v2:
* Drop from x86-emulate.h too.
--- tools/include/xen-tools/common-macros.h | 1 + tools/libs/light/libxl_internal.h | 2 -- tools/tests/x86_emulator/x86-emulate.h | 3 --- 3 files changed, 1 insertion(+), 5 deletions(-)
tools/include/xen-tools/common-macros.h +1 -0
@@ -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__))
tools/libs/light/libxl_internal.h +0 -2
@@ -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
tools/tests/x86_emulator/x86-emulate.h +0 -3
@@ -51,9 +51,6 @@#define DEFINE_PER_CPU (type, var) type per_cpu_##var#define this_cpu (var) per_cpu_##var -#define MASK_EXTR (v, m) (((v) & (m)) / ((m) & -(m))) -#define MASK_INSR (v, m) (((v) * ((m) & -(m))) & (m)) -#define __init#define __maybe_unused __attribute__((__unused__))
Signature · 1 line
2.30.2
Urgh, well I'm failing at email today. This is v2. Everything else in the patch is as intended.
~Andrew
Quoted 61 lines · Andrew Cooper
MASK_EXTR()andMASK_INSR()are a matching pair. Keep them together.Drop the pair from
x86-emulate.hwhich includescommon-macros.h.Fixes 56a7aaa16bfe ("tools: add physinfo arch_capabilities handling for Arm")Signed-off-by Andrew Cooper <[email protected]>---
CC: Anthony PERARD <[email protected]>
CC: Juergen Gross <[email protected]>
CC: Luca Fancellu <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>v2:
* Drop fromx86-emulate.htoo.--- tools/include/xen-tools/common-macros.h | 1 + tools/libs/light/libxl_internal.h | 2 -- tools/tests/x86_emulator/x86-emulate.h | 3 --- 3 files changed, 1 insertion(+), 5 deletions(-)tools/include/xen-tools/common-macros.h +1
-0@@ -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__))tools/libs/light/libxl_internal.h +0
-2@@ -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 tools/tests/x86_emulator/x86-emulate.h +0
-3@@ -51,9 +51,6 @@#define DEFINE_PER_CPU (type, var) type per_cpu_##var#define this_cpu (var) per_cpu_##var -#define MASK_EXTR (v, m) (((v) & (m)) / ((m) & -(m))) -#define MASK_INSR (v, m) (((v) * ((m) & -(m))) & (m)) -#define __init#define __maybe_unused __attribute__((__unused__))
Quoted 10 lines · Andrew Cooper
MASK_EXTR()andMASK_INSR()are a matching pair. Keep them together.Drop the pair from
x86-emulate.hwhich includescommon-macros.h.Fixes 56a7aaa16bfe ("tools: add physinfo arch_capabilities handling for Arm")Signed-off-by Andrew Cooper <[email protected]>
I think you forgot to retain my R-by:
Quoted 58 lines
---
CC: Anthony PERARD <[email protected]>
CC: Juergen Gross <[email protected]>
CC: Luca Fancellu <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>v2:
* Drop fromx86-emulate.htoo.
---tools/include/xen-tools/common-macros.h | 1 + tools/libs/light/libxl_internal.h | 2 -- tools/tests/x86_emulator/x86-emulate.h | 3 --- 3 files changed, 1 insertion(+), 5 deletions(-)tools/include/xen-tools/common-macros.h +1
-0@@ -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__))tools/libs/light/libxl_internal.h +0
-2@@ -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 tools/tests/x86_emulator/x86-emulate.h +0
-3@@ -51,9 +51,6 @@#define DEFINE_PER_CPU (type, var) type per_cpu_##var#define this_cpu (var) per_cpu_##var -#define MASK_EXTR (v, m) (((v) & (m)) / ((m) & -(m))) -#define MASK_INSR (v, m) (((v) * ((m) & -(m))) & (m)) -#define __init#define __maybe_unused __attribute__((__unused__))Signature · 1 line
2.30.2
Quoted 5 lines · Luca Fancellu
Quoted 5 lines · Andrew Cooper
MASK_EXTR()andMASK_INSR()are a matching pair. Keep them together.
Quoted 7 lines
Quoted 4 lines
Drop the pair from
x86-emulate.hwhich includescommon-macros.h.Fixes 56a7aaa16bfe ("tools: add physinfo arch_capabilities handling for Arm")Signed-off-by Andrew Cooper <[email protected]>I think you forgot to retain my R-by:
Reviewed-by Luca Fancellu <[email protected]>
I did. I'm very sorry. I need more coffee.
Thanks,
~Andrew
Quoted 6 lines · Andrew Cooper
MASK_EXTR()andMASK_INSR()are a matching pair. Keep them together.Drop the pair from
x86-emulate.hwhich includescommon-macros.h.Fixes 56a7aaa16bfe ("tools: add physinfo arch_capabilities handling for Arm")Signed-off-by Andrew Cooper <[email protected]>
Thanks, Roger.
Quoted 7 lines · Andrew Cooper
MASK_EXTR()andMASK_INSR()are a matching pair. Keep them together.Drop the pair from
x86-emulate.hwhich includescommon-macros.h.Fixes 56a7aaa16bfe ("tools: add physinfo arch_capabilities handling for Arm")Signed-off-by Andrew Cooper <[email protected]>
I have (and will now be dropping) an equivalent patch for my forthcoming HWP v4 series.
Thanks,
Jason