[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v9 04/15] xen/bitops: put __ffs() into linux compatible header
- To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
- From: Rahul Singh <Rahul.Singh@xxxxxxx>
- Date: Wed, 15 May 2024 15:08:33 +0000
- Accept-language: en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=v/+9rMwEnhWdLab1Y2cQ+a1OelbnrTzOuGzbl5m1z7U=; b=NRjART/6JllAJmdbKzy7zFpbqiPGkaToo98CAKDAPqHFRmQq57m1tdWFrCw/RaREW8Q+dUgsq9CplM1OlTGaOlZ0H1ZGnDkpkh0F1ILJhlItX8g0Ogrt1vi7+HAonTnazNI8f7DMsZGBh0/Kiv1flWakeIzZB7iTrsN/vi/2nnXnJJfDNjL5UMIUkYflTZoofYxvs7RmLG//GHqFwjeaL+H4tWaFz/zPl+cVwTMAwdrN2p0Bhd82eEGTlI7C3odsgWJ0aY1XEIY4pHCA6E/zYNj3ajbFbfPZS6DGtt28LumN9I1sC/LqX2/wmGOzjB7WluQa9OaU6qCaoX3YHflW/A==
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=v/+9rMwEnhWdLab1Y2cQ+a1OelbnrTzOuGzbl5m1z7U=; b=hD0oxacsan4XDhhOxP2JQCB6CBt+QUwBVQaR+/wyNZ0hmHNtLxLt/t6dsUUTPYW78a8rapy7Nx3CO4vzcBH9Lrzc1W/J5uMc4CS0Lb7Eqt7oRVOoMOyuU+FZ7vhYp6ZaEx6mMfuaefXrDbgTsSVBZw1JVB1PrphB0ywTlg9jRaNr+m/3jVUx9Tfwggq81X9A6RQz2Sj+s8DnRZLhhB0b99Zm+9QMBsuLDFtv1JsfDFF9E5cyh16U/yc4yxza40Jih3UA4Rfali1sTXuK1SLmf+7Qre+udkeW5kV4pZcaBxDf/b09AWgYfLkJkF25QI+jCk3Hn/03wKClEjKxAblxHA==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Sm+y31RBMu6gwEEZ2AFnf0aDjLOC0MqsB3hiBJ9CSMX8o/RtitL28FdJWYCKk/RjMPq/X2Ed/bAEq+qvHeyJbnKjZFKY/NAZNGluAktLVPPX/jl7i2X7PqNceu+/pYZL/Ut+uijapF58OjXAa8+DDPvn5oGzswgv7BTozQgL6KCo9f6w+wk4d0Z79omrfBnY6l3Q3/0VRx5b+Cv6fVG9AMHEToBghRc2DedP7aq/gO55NyhQguWmRmRNAsGsSUCTTxx6ir8JX91DntFxnP/EwhCNUe3jYMU78YdmO47qg+Z0uqprLo2lsOfy8BRXhZIKmj13UNJvij6yE/ri61GAVw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EDqZa6dtA3XKpy1IMFxjryF35G9wJV0sZBxXxg4aRqcH0Do8Dhk7du/LYuqmu0wTazFoeRSB+ETZ3yuehzEE5rAroq1hXoL1cHLMCmAdUflDvlFcKakWkwQx2N3Gd9t6IzlSLbFDHvi6fU+3aNFGP6n9lk+PtCvcHK4oNtlDDHH7LRjcpcPUrTa6R4dIvGdzpp7c6nF+xsIHdeAIAFWf5gxVN4dNXGWkpV8mKlYt1sxvExyV02T4GRKx+X1GJuMFxoLy2LHxDF9rhdsCLdtuTSWTKWidQaqh2XcxLBBG+XiaHVb0JhFCBxQQsH/uOXujkXVrzq7WCos/y8Z8/m2SDg==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Wed, 15 May 2024 15:09:56 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHan55fe9tWwhK0EkCZuWBTgB6qOLGYdCCA
- Thread-topic: [PATCH v9 04/15] xen/bitops: put __ffs() into linux compatible header
Hi Oleksii,
> On 6 May 2024, at 11:15 AM, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
> wrote:
>
> The mentioned macros exist only because of Linux compatible purpose.
>
> The patch defines __ffs() in terms of Xen bitops and it is safe
> to define in this way ( as __ffs() - 1 ) as considering that __ffs()
> was defined as __builtin_ctzl(x), which has undefined behavior when x=0,
> so it is assumed that such cases are not encountered in the current code.
>
> To not include <xen/linux-compat.h> to Xen library files __ffs() and __ffz()
> were defined locally in find-next-bit.c.
>
> Except __ffs() usage in find-next-bit.c only one usage of __ffs() leave
> in smmu-v3.c. It seems that it __ffs can be changed to ffsl(x)-1 in
> this file, but to keep smmu-v3.c looks close to linux it was deciced just
> to define __ffs() in xen/linux-compat.h and include it in smmu-v3.c
>
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
> Acked-by: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
For SMMUv3 changes:
Acked-by: Rahul Singh <rahul.singh@xxxxxxx>
Regards,
Rahul
|