]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
xen: replace ffsl with ctzl
authorNatanael Copa <ncopa@alpinelinux.org>
Tue, 29 Apr 2014 14:17:28 +0000 (16:17 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 10 Jun 2014 23:25:06 +0000 (00:25 +0100)
ffsl is a GNU extension and not available in musl libc.

See also commit fbeadf50 (bitops: unify bitops_ffsl with the one in
host-utils.h, call it bitops_ctzl) on why ctzl should be used instead
of ffsl.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
[PMM: rebased to accommodate file rename to xen-hvm.c]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
xen-hvm.c

index a64486cd35f9c83d42481c79f88351c3224cf96e..aac38efb0951addd70d96a0ee65918af0cedd6a6 100644 (file)
--- a/xen-hvm.c
+++ b/xen-hvm.c
@@ -511,7 +511,7 @@ static void xen_sync_dirty_bitmap(XenIOState *state,
     for (i = 0; i < ARRAY_SIZE(bitmap); i++) {
         unsigned long map = bitmap[i];
         while (map != 0) {
-            j = ffsl(map) - 1;
+            j = ctzl(map);
             map &= ~(1ul << j);
             memory_region_set_dirty(framebuffer,
                                     (i * width + j) * TARGET_PAGE_SIZE,