From patchwork Wed Jun 11 14:29:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 358704 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 03E3714007C for ; Thu, 12 Jun 2014 00:34:09 +1000 (EST) Received: from localhost ([::1]:46848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WujbK-00024N-VE for incoming@patchwork.ozlabs.org; Wed, 11 Jun 2014 10:34:06 -0400 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 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WujXF-00075a-Q2; Wed, 11 Jun 2014 15:29:53 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Wed, 11 Jun 2014 15:29:43 +0100 Message-Id: <1402496993-27206-6-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1402496993-27206-1-git-send-email-peter.maydell@linaro.org> References: <1402496993-27206-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: Blue Swirl Subject: [Qemu-devel] [PULL 05/15] xen: replace ffsl with ctzl X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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,