Message ID | 20221219154119.022180444@infradead.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2463816wrn; Mon, 19 Dec 2022 07:48:22 -0800 (PST) X-Google-Smtp-Source: AA0mqf7RZHHBT5cjOWYN1Z8YN+1z1b3sFpcjWFgyGk1ohNs1r+UhsuzdrZEgJoUH/kbyCksAlVOP X-Received: by 2002:a05:6a20:9f87:b0:9d:efbf:787d with SMTP id mm7-20020a056a209f8700b0009defbf787dmr51615037pzb.50.1671464902327; Mon, 19 Dec 2022 07:48:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671464902; cv=none; d=google.com; s=arc-20160816; b=VCr0+LRJtWsR4YK1JFnWzmR8Rr39Do2pCej3E3C0zhjC02AvGN/TCp9z4O5wNLDpt5 PbVsslSKFwaJGgfZzwWJXgoXxknzLL2fON5tEqQPohlgidgQyjMziCIoNeBzm1qti5kj jFKXkdmK5tkknac3Lb/BmTLm9IBdiz0l6oUd47n3xTfIMSokQXnNhSbAoF0hafju22kN 4ICGztRSEYxAm3Qgz5Acl8nEeHFrWxMWg3acnTjPzOuOzKLoFCGkhrsOuLAzjmtLc/ii Pd0I1fo6MJLqW+jIqm3FAkGXKu+BpAZYEQ7EOip0tNSthSyhrAU9yrVGCrwspyDK6W+5 MKKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:subject:cc:to:from:date :user-agent:message-id:dkim-signature; bh=HwKpSq8Syzt9wYk5/qyQZy9JqJElqdY1XVTNG2HpXaA=; b=Ue6gHdnSk0HwaCIxvejV+l8+vZgkb8XK4sduC+OZ0lcbsVEiZWZEuMyB586jJVRkps 7VHH28gkx3VIUJdH6o+z4gcSiYv++P4CKSn3jknBBZkCsjFj0A4D1u4EpOmztgihC57N OyBM7aIWTL+HR2sCyzHlQDYpzr5cNoihvdv8PsxV+JNODpdBH/1zLy3Cl6TXCBFs8sVK 1lljfAJtSj+gqIvcWPLfwTzBAf5vj7i7FugLDf4OkOFeGrR+aePQtL9uvXj91MpCIR9D qadqhXRFjh7CkPB+QEhQr+5N+RylyvMUO1G2Vb0WUjUBIFiIyrHAgse0IthIg6NGkNof ciHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=C89SVOTN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d20-20020a637354000000b00476cc73fd87si11327045pgn.512.2022.12.19.07.48.09; Mon, 19 Dec 2022 07:48:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=C89SVOTN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232399AbiLSPqg (ORCPT <rfc822;abdi.embedded@gmail.com> + 99 others); Mon, 19 Dec 2022 10:46:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232562AbiLSPpd (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 19 Dec 2022 10:45:33 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AA2013F46; Mon, 19 Dec 2022 07:44:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-ID:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To; bh=HwKpSq8Syzt9wYk5/qyQZy9JqJElqdY1XVTNG2HpXaA=; b=C89SVOTN4frRfghMH72mO24iYJ pVkZGAAkMqRxVkuH3fpqA8/0D1aFHW6y76H1YnF8kEDFDm33E8UubQcUKhJKpWZG8jDggtq8uBBzW U+SxkTxM4g0Q4uVrYdyNJqtyBLrQ5J7iHfduxeojqYnxDrzaSPCi7ttbP4Dg/mEyo3g341YNDQ5Bj 8CplCFReZ3n2JbDGVtP5MXOFW56RblTJKRv8Kcn9PDdv6XD/jCDzjQgWk8Jwq7PfTGyAOmvYLBOrd tix3uV9D5+yfntLLV6oTkPEC51xWm3pii6k4b1Pg03G6ocA15Z1RIniFBXvpIunHhG6jU70qH5Akn jgEqG5Xw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1p7III-00CeDm-27; Mon, 19 Dec 2022 15:43:11 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id A20AD302DA8; Mon, 19 Dec 2022 16:43:06 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id 6BFEC20B0F89A; Mon, 19 Dec 2022 16:43:06 +0100 (CET) Message-ID: <20221219154119.022180444@infradead.org> User-Agent: quilt/0.66 Date: Mon, 19 Dec 2022 16:35:28 +0100 From: Peter Zijlstra <peterz@infradead.org> To: torvalds@linux-foundation.org Cc: corbet@lwn.net, will@kernel.org, peterz@infradead.org, boqun.feng@gmail.com, mark.rutland@arm.com, catalin.marinas@arm.com, dennis@kernel.org, tj@kernel.org, cl@linux.com, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, borntraeger@linux.ibm.com, svens@linux.ibm.com, Herbert Xu <herbert@gondor.apana.org.au>, davem@davemloft.net, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, joro@8bytes.org, suravee.suthikulpanit@amd.com, robin.murphy@arm.com, dwmw2@infradead.org, baolu.lu@linux.intel.com, Arnd Bergmann <arnd@arndb.de>, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, Andrew Morton <akpm@linux-foundation.org>, vbabka@suse.cz, roman.gushchin@linux.dev, 42.hyeyoo@gmail.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org, linux-crypto@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org Subject: [RFC][PATCH 03/12] cyrpto/b128ops: Remove struct u128 References: <20221219153525.632521981@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752657981455323432?= X-GMAIL-MSGID: =?utf-8?q?1752657981455323432?= |
Series |
Introduce cmpxchg128() -- aka. the demise of cmpxchg_double()
|
|
Commit Message
Peter Zijlstra
Dec. 19, 2022, 3:35 p.m. UTC
Per git-grep u128_xor() and its related struct u128 are unused except
to implement {be,le}128_xor(). Remove them to free up the namespace.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
include/crypto/b128ops.h | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
Comments
On Mon, Dec 19, 2022 at 04:35:28PM +0100, Peter Zijlstra wrote: > cyrpto/b128ops: Remove struct u128 cyrpto => crypto > Per git-grep u128_xor() and its related struct u128 are unused except > to implement {be,le}128_xor(). Remove them to free up the namespace. There's still a reference to u128 in drivers/crypto/vmx/ghash.c. But, it's only dereferenced by assembly code, so it should keep working even if u128 gets redefined to a native int. I don't speak PowerPC, so I'm not sure what the "correct" type is there. - Eric
--- a/include/crypto/b128ops.h +++ b/include/crypto/b128ops.h @@ -50,10 +50,6 @@ #include <linux/types.h> typedef struct { - u64 a, b; -} u128; - -typedef struct { __be64 a, b; } be128; @@ -61,20 +57,16 @@ typedef struct { __le64 b, a; } le128; -static inline void u128_xor(u128 *r, const u128 *p, const u128 *q) +static inline void be128_xor(be128 *r, const be128 *p, const be128 *q) { r->a = p->a ^ q->a; r->b = p->b ^ q->b; } -static inline void be128_xor(be128 *r, const be128 *p, const be128 *q) -{ - u128_xor((u128 *)r, (u128 *)p, (u128 *)q); -} - static inline void le128_xor(le128 *r, const le128 *p, const le128 *q) { - u128_xor((u128 *)r, (u128 *)p, (u128 *)q); + r->a = p->a ^ q->a; + r->b = p->b ^ q->b; } #endif /* _CRYPTO_B128OPS_H */