From nobody Mon Feb 9 05:13:49 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1610117473; cv=none; d=zohomail.com; s=zohoarc; b=C/wfw6pJFFHuz7iJm8eIcjv+BA49byzX3Yq1t2L3HkQNQ43aE83CLxR6oTbXnFfXnVid+NZsHSmzEfZ6gA3t6XM1j1UX4lkLyAUY1J9/6rGyH7cCNYRtuFIMpSZ0YWCaIhbb++zTJMDbAsDBs0kYjVAKAOPvhJ6jb13mBuvNQzg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610117473; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=NXqKae7K+TjJjc8UkiCqdqMGXde2bcPwEE3K0Ar/IM8=; b=dq2t/HSmYQAbx275rqGVlw1kWRihrBiXNORx76e3PDe+STcFy4R5s+GMIPNyQ7ldSraWI5brOicxECDw/YoaNWSuIKpEvTvj3DJgJ259ua13qFjmWc9bqLgu5HPo1yRIgXAMwV1XZ5dt4uSUshkaH9dlIptaMVm7AOKTMUxYoNs= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1610117473028166.00753648494617; Fri, 8 Jan 2021 06:51:13 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.63546.112808 (Exim 4.92) (envelope-from ) id 1kxt6M-0008Rl-0P; Fri, 08 Jan 2021 14:50:54 +0000 Received: by outflank-mailman (output) from mailman id 63546.112808; Fri, 08 Jan 2021 14:50:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kxt6L-0008Re-Sb; Fri, 08 Jan 2021 14:50:53 +0000 Received: by outflank-mailman (input) for mailman id 63546; Fri, 08 Jan 2021 14:50:52 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kxt6K-0008RL-R0 for xen-devel@lists.xenproject.org; Fri, 08 Jan 2021 14:50:52 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id e34234fe-02a3-46e8-88f9-137e05f4d4f9; Fri, 08 Jan 2021 14:50:51 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8DB28ED1; Fri, 8 Jan 2021 06:50:51 -0800 (PST) Received: from scm-wfh-server-rahsin01.stack04.eu02.mi.arm.com (unknown [10.58.246.76]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AA9293F70D; Fri, 8 Jan 2021 06:50:50 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: e34234fe-02a3-46e8-88f9-137e05f4d4f9 From: Rahul Singh To: xen-devel@lists.xenproject.org Cc: bertrand.marquis@arm.com, rahul.singh@arm.com, Stefano Stabellini , Julien Grall , Volodymyr Babchuk Subject: [PATCH v4 07/11] xen/arm: bitops: Implement a ffsll function Date: Fri, 8 Jan 2021 14:46:27 +0000 Message-Id: <7c0410f150d78bae49c1d8ae0d918b56c2b0c7de.1610115608.git.rahul.singh@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Implement the ffsll based on built-in function "__builtin_ffsll()" ffsll will return one plus the index of the least significant 1-bit in doublewords or if doublewords is zero, returns zero. Signed-off-by: Rahul Singh Reviewed-by: Bertrand Marquis Reviewed-by: Stefano Stabellini --- Changes in V4: - This patch is introduce in this verison. --- xen/include/asm-arm/bitops.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xen/include/asm-arm/bitops.h b/xen/include/asm-arm/bitops.h index 71ae14cab3..7f83ee1828 100644 --- a/xen/include/asm-arm/bitops.h +++ b/xen/include/asm-arm/bitops.h @@ -170,6 +170,18 @@ static inline unsigned int find_first_set_bit(unsigned= long word) return ffsl(word) - 1; } =20 +/** + * ffsll - find the first least significant set bit + * @doubleword: double word to search + * + * Returns one plus the index of the least significant 1-bit in @doubleword + * or if doubleword is zero, returns zero. + */ +static inline int ffsll(long long doubleword) +{ + return __builtin_ffsll(doubleword); +} + /** * hweightN - returns the hamming weight of a N-bit word * @x: the word to weigh --=20 2.17.1