[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y6CJsWBhcbKatZNg@zx2c4.com>
Date: Mon, 19 Dec 2022 16:56:33 +0100
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: torvalds@...ux-foundation.org, corbet@....net, will@...nel.org,
boqun.feng@...il.com, mark.rutland@....com,
catalin.marinas@....com, dennis@...nel.org, tj@...nel.org,
cl@...ux.com, hca@...ux.ibm.com, gor@...ux.ibm.com,
agordeev@...ux.ibm.com, borntraeger@...ux.ibm.com,
svens@...ux.ibm.com, Herbert Xu <herbert@...dor.apana.org.au>,
davem@...emloft.net, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, dave.hansen@...ux.intel.com, x86@...nel.org,
hpa@...or.com, joro@...tes.org, suravee.suthikulpanit@....com,
robin.murphy@....com, dwmw2@...radead.org,
baolu.lu@...ux.intel.com, Arnd Bergmann <arnd@...db.de>,
penberg@...nel.org, rientjes@...gle.com, iamjoonsoo.kim@....com,
Andrew Morton <akpm@...ux-foundation.org>, vbabka@...e.cz,
roman.gushchin@...ux.dev, 42.hyeyoo@...il.com,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, linux-s390@...r.kernel.org,
linux-crypto@...r.kernel.org, iommu@...ts.linux.dev,
linux-arch@...r.kernel.org
Subject: Re: [RFC][PATCH 01/12] crypto: Remove u128 usage
On Mon, Dec 19, 2022 at 04:35:26PM +0100, Peter Zijlstra wrote:
> As seems to be the common (majority) usage in crypto, use __uint128_t
> instead of u128.
>
> This frees up u128 for definition in linux/types.h.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
> lib/crypto/curve25519-hacl64.c | 142 ++++++++++++++++++++---------------------
> lib/crypto/poly1305-donna64.c | 22 ++----
> 2 files changed, 80 insertions(+), 84 deletions(-)
>
> --- a/lib/crypto/curve25519-hacl64.c
> +++ b/lib/crypto/curve25519-hacl64.c
> @@ -14,8 +14,6 @@
> #include <crypto/curve25519.h>
> #include <linux/string.h>
>
> -typedef __uint128_t u128;
> -
> static __always_inline u64 u64_eq_mask(u64 a, u64 b)
> {
> u64 x = a ^ b;
> @@ -50,77 +48,77 @@ static __always_inline void modulo_carry
> b[0] = b0_;
> }
>
> -static __always_inline void fproduct_copy_from_wide_(u64 *output, u128 *input)
> +static __always_inline void fproduct_copy_from_wide_(u64 *output, __uint128_t *input)
> {
> {
> - u128 xi = input[0];
> + __uint128_t xi = input[0];
Why not just use `u128` from types.h in this file?
Jason
Powered by blists - more mailing lists