]> xenbits.xensource.com Git - xen.git/commit
xen/bitops: Cleanup and new infrastructure ahead of rearrangements
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 8 Mar 2024 23:45:08 +0000 (23:45 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Sat, 1 Jun 2024 01:28:14 +0000 (02:28 +0100)
commitea59e7d780d9506793226b8cd1b402e341b195a7
tree2232e558df60e8aeb7c5d4a3524535fe59fc9037
parent1408cf7a2840c0839d988f8cbf910eecac1655ef
xen/bitops: Cleanup and new infrastructure ahead of rearrangements

 * Rename __attribute_pure__ to just __pure before it gains users.
 * Introduce __constructor which is going to be used in lib/, and is
   unconditionally cf_check.
 * Identify the areas of xen/bitops.h which are a mess.
 * Introduce xen/self-tests.h as helpers for compile and boot time testing.
   This provides a statement of the ABI, and a confirmation that arch-specific
   implementations behave as expected.
 * Introduce HIDE() in macros.h.  While it's only used in self-tests.h for
   now, we're going to consolidate similar constructs in due course.

Sadly Clang 7 and older isn't happy with the compile time checks.  Skip them,
and just rely on the runtime checks.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
xen/include/xen/bitops.h
xen/include/xen/compiler.h
xen/include/xen/macros.h
xen/include/xen/self-tests.h [new file with mode: 0644]