From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFA1D2F9C37 for ; Tue, 31 Mar 2026 22:41:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774996918; cv=none; b=hRdQxHY8+qFfonFBVdoi1Wa5Lth/wiU4f5LHboI5wDs/dePAwAtZ8xCru+rmPZL9qKoRw124xu/7+W1juKRn7UUSfdxTQqayB8tvjRIS7m7VN1L4n0epxJQPYpM6T0n0VuFua+EiLgs9QOT81ovI7VlwkLAXKRiWuaKEOF8JNW4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774996918; c=relaxed/simple; bh=BIQjuY/Cy0cBjXyayPBeo180JhWYpL7ZP6b21kAEW/s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lvJM4EjvGjkLqaEATCupCr7GZE1RYozDHK9NBGcub7b7zCWGx8jQC6gx19U9aE+7hA3KVMn/kjhg1SXRMfy3VkZFMoQdISAESAgi8X7wwKMF6uWKj4hHuzmvV33p9pEZNUK8+8N/PpgeDBFjcL3oO0u2U3p4dSyD6PrtdvD8JHc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UYgMVVZ+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UYgMVVZ+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90A94C19423; Tue, 31 Mar 2026 22:41:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774996918; bh=BIQjuY/Cy0cBjXyayPBeo180JhWYpL7ZP6b21kAEW/s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UYgMVVZ+W0ar1qIEYUb2isYfPkFwRgVwZcJlDV1Z5D0ql77FSMlVyf5VMR6Qk1Why WsNwHbL4/dGfr00H/V9O4F93uCxt3g2FGoWjwHSNImsFMWIIzbVopJvsopDfgz727j spn0jldgS8EW5+p1EZxX0fXy5PB5Ecwb96zR3g/afgVtWbgYagi2DKuT2EqimNgfQX +RK+YtGbdCLM9UD0PYouQaReXFVksx2JR2DPfEWx6DA2KNfSD8YDqm9mru76JY9dbH zHOVPrd6s96yiYJciyvCAOaMLlQqaxgBvTjpZt5bl+cNfwsUV+bdVQXWwoQgkL6nUw D2JzqvSbQBb6g== Date: Tue, 31 Mar 2026 15:41:56 -0700 From: Eric Biggers To: Ard Biesheuvel Cc: linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Demian Shulhan Subject: Re: [PATCH 5/5] lib/crc: arm: Enable arm64's NEON intrinsics implementation of crc64 Message-ID: <20260331224156.GB45047@quark> References: <20260330144630.33026-7-ardb@kernel.org> <20260330144630.33026-12-ardb@kernel.org> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260330144630.33026-12-ardb@kernel.org> On Mon, Mar 30, 2026 at 04:46:36PM +0200, Ard Biesheuvel wrote: > Enable big-endian support only on GCC - the code generated by Clang is > horribly broken. [...] > +#if defined(CONFIG_ARM) && defined(CONFIG_CC_IS_CLANG) > +static inline uint64x2_t pmull64(uint64x2_t a, uint64x2_t b) > +{ > + uint64_t l = vgetq_lane_u64(a, 0); > + uint64_t m = vgetq_lane_u64(b, 0); > + uint64x2_t result; > + > + asm("vmull.p64 %q0, %1, %2" : "=w"(result) : "w"(l), "w"(m)); > + > + return result; > +} Perhaps omit big endian support, and use the inline asm implementation of these functions with both gcc and clang? The more unique combinations need to be tested to cover all the code, the higher the chance of one being missed in testing. Also, leaving shared code in lib/crc/arm64/ will be confusing. How about lib/crc/arm-common/, and crc64_nvme_arm64_c => crc64_nvme_neon()? Or even just put crc64-neon.c directly in lib/crc/. - Eric