qemu: Document qemu_arch_available() method
qemu_arch_available() is used to check if a broadly available feature should be exposed to a particular set of target architectures. Since its argument is a mask of bits, rename it as @arch_bitmask. We have less than 32 target architectures so far, so restrict it to the uint32_t type. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20260213175032.32121-2-philmd@linaro.org>
Philippe Mathieu-Daudé committed
Feb 13, 2026 at 15:11 UTC
4b75d19e362bf951b94c5f7738ff830fb6035fd7
2 files changed
+9
-3
include/system/arch_init.h
+7
-1
@@ -25,6 +25,12 @@ enum {
25
QEMU_ARCH_LOONGARCH = (1 << 23),
26
};
27
28
-bool qemu_arch_available(unsigned qemu_arch_mask);
28
+/**
29
+ * qemu_arch_available:
30
+ * @arch_bitmask: bitmask of QEMU_ARCH_* constants
31
+ *
32
+ * Return whether the current target architecture is contained in @arch_bitmask
33
+ */
34
+bool qemu_arch_available(uint32_t arch_bitmask);
35
36
#endif
system/arch_init.c
+2
-2
@@ -24,7 +24,7 @@
24
#include "qemu/osdep.h"
25
#include "system/arch_init.h"
26
27
-bool qemu_arch_available(unsigned qemu_arch_mask)
27
+bool qemu_arch_available(uint32_t arch_bitmask)
28
{
29
- return qemu_arch_mask & QEMU_ARCH;
29
+ return arch_bitmask & QEMU_ARCH;
30
}