On 13/03/2024 5:48 pm, Andrew Cooper wrote:
> On 13/03/2024 5:27 pm, Andrew Cooper wrote:
>> xen/arch/arm/include/asm/bitops.h | 2 +-
>> xen/arch/ppc/include/asm/bitops.h | 1 -
>> xen/arch/x86/include/asm/bitops.h | 30 +-
>> xen/common/bitops.c | 7 +
On 13/03/2024 5:27 pm, Andrew Cooper wrote:
> diff --git a/xen/common/bitops.c b/xen/common/bitops.c
> index 484df68768ad..eceffe5029d6 100644
> --- a/xen/common/bitops.c
> +++ b/xen/common/bitops.c
> @@ -40,6 +40,13 @@ static void test_ffs(void)
> CHECK(ffs, 0, 0);
> CHECK(ffs, 1, 1);
>
On 13/03/2024 5:27 pm, Andrew Cooper wrote:
> xen/arch/arm/include/asm/bitops.h | 2 +-
> xen/arch/ppc/include/asm/bitops.h | 1 -
> xen/arch/x86/include/asm/bitops.h | 30 +-
> xen/common/bitops.c | 7 +++
> xen/include/xen/bitops.h | 12 +
Exactly as per ffs() in the previous patch. Express the upper bound of the
testing in terms of BITS_PER_LONG as it varies between architectures.
Signed-off-by: Andrew Cooper
---
CC: Jan Beulich
CC: Roger Pau Monné
CC: Wei Liu
CC: Stefano Stabellini
CC: Julien Grall
CC: Volodymyr Babchuk
CC