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: 31771 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f200.google.com (mail-ig0-f200.google.com [209.85.213.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 61F2221134 for ; Wed, 11 Jun 2014 14:34:27 +0000 (UTC) Received: by mail-ig0-f200.google.com with SMTP id l13sf2671940iga.11 for ; Wed, 11 Jun 2014 07:34:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=6UXITwyofLKc2Y6g7JdC/oTZMLhgljKrrol+cvb8LTg=; b=YG8UmkcY9i0r5BoO/F68/djsYcjagJmyMU9AdPX0ahTlLZf1FbrsCh90ZUZ4I0FnjB Q68p0b29JedaXcp4JPzEwhjCWsHze7JHd3JS4nN9Ky6WO4/3cw5sXaCGDJMmWBRMApEG Zoo4b6ne/BwPYlFHUsodjLggVp0kiQU0EyXtgZIxaDRoxt1/8uRk1Bfu2GwKpUZGgHmp s0WzjhzRp89vWc3kgCJdu+99bGLkLLutLIdUL5Huw02c7kWvg2LusNuw3oBh7KleTCDH RwVxwXG+fcolDroBXDot73XBhN53PyHncHosrlK4YjHrLZRqhEEh5jpA6A97WY7QD9Xe ulkg== X-Gm-Message-State: ALoCoQkoqfaHvCUnHPu53pOVUzplM7HTUKx9+IPflZx1EjWRgdkop6gI7WrCXr8aFxgyceFazlZL X-Received: by 10.43.12.67 with SMTP id ph3mr6330988icb.28.1402497266960; Wed, 11 Jun 2014 07:34:26 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.33.244 with SMTP id j107ls2530788qgj.24.gmail; Wed, 11 Jun 2014 07:34:26 -0700 (PDT) X-Received: by 10.52.26.165 with SMTP id m5mr370413vdg.93.1402497266769; Wed, 11 Jun 2014 07:34:26 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id yi11si2054546vdb.1.2014.06.11.07.34.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Jun 2014 07:34:26 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.182 as permitted sender) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id jx11so219529veb.13 for ; Wed, 11 Jun 2014 07:34:26 -0700 (PDT) X-Received: by 10.58.185.165 with SMTP id fd5mr3330225vec.41.1402497266703; Wed, 11 Jun 2014 07:34:26 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp308670vcb; Wed, 11 Jun 2014 07:34:26 -0700 (PDT) X-Received: by 10.229.239.4 with SMTP id ku4mr51685226qcb.17.1402497265652; Wed, 11 Jun 2014 07:34:25 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id s90si30818865qga.18.2014.06.11.07.34.25 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 11 Jun 2014 07:34:25 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:46848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wujbd-00024N-94 for patch@linaro.org; Wed, 11 Jun 2014 10:34:25 -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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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,