qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 05/15] xen: replace ffsl with ctzl


From: Peter Maydell
Subject: [Qemu-devel] [PULL 05/15] xen: replace ffsl with ctzl
Date: Wed, 11 Jun 2014 15:29:43 +0100

From: Natanael Copa <address@hidden>

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 <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
[PMM: rebased to accommodate file rename to xen-hvm.c]
Signed-off-by: Peter Maydell <address@hidden>
---
 xen-hvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen-hvm.c b/xen-hvm.c
index a64486c..aac38ef 100644
--- 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,
-- 
1.9.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]