Received: from eggs.gnu.org ([2001:4830:134:3::10]:38443) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WujXV-0004vn-4z for qemu-devel@nongnu.org; Wed, 11 Jun 2014 10:30:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WujXR-0008PJ-9D for qemu-devel@nongnu.org; Wed, 11 Jun 2014 10:30:09 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:48600) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WujXR-0008DN-3V for qemu-devel@nongnu.org; Wed, 11 Jun 2014 10:30:05 -0400 From: Peter Maydell Date: Wed, 11 Jun 2014 15:29:43 +0100 Message-Id: <1402496993-27206-6-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1402496993-27206-1-git-send-email-peter.maydell@linaro.org> References: <1402496993-27206-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PULL 05/15] xen: replace ffsl with ctzl List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl From: Natanael Copa 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 Reviewed-by: Paolo Bonzini [PMM: rebased to accommodate file rename to xen-hvm.c] Signed-off-by: Peter Maydell --- 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