From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDC59C433F5 for ; Tue, 5 Apr 2022 22:57:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 407616B0074; Tue, 5 Apr 2022 18:57:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3B6CD6B0075; Tue, 5 Apr 2022 18:57:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 27E836B0078; Tue, 5 Apr 2022 18:57:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 138E26B0074 for ; Tue, 5 Apr 2022 18:57:37 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id E2F42603F3 for ; Tue, 5 Apr 2022 22:57:26 +0000 (UTC) X-FDA: 79324338492.12.40FE254 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by imf10.hostedemail.com (Postfix) with ESMTP id 9EFB1C0038 for ; Tue, 5 Apr 2022 22:57:25 +0000 (UTC) Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1nbs6h-000qES-8W; Wed, 06 Apr 2022 08:57:04 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Wed, 06 Apr 2022 08:57:03 +1000 Date: Wed, 6 Apr 2022 08:57:03 +1000 From: Herbert Xu To: Catalin Marinas , Ard Biesheuvel Cc: Will Deacon , Marc Zyngier , Arnd Bergmann , Greg Kroah-Hartman , Andrew Morton , Linus Torvalds , linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "David S. Miller" Subject: Re: [PATCH 07/10] crypto: Use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN Message-ID: References: <20220405135758.774016-1-catalin.marinas@arm.com> <20220405135758.774016-8-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220405135758.774016-8-catalin.marinas@arm.com> Authentication-Results: imf10.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf10.hostedemail.com: domain of herbert@gondor.apana.org.au designates 216.24.177.18 as permitted sender) smtp.mailfrom=herbert@gondor.apana.org.au X-Stat-Signature: e8btzafux9eaqqs5357aknq7dhekynwc X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 9EFB1C0038 X-HE-Tag: 1649199445-610191 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Apr 05, 2022 at 02:57:55PM +0100, Catalin Marinas wrote: > ARCH_DMA_MINALIGN represents the minimum (static) alignment for safe DMA > operations while ARCH_KMALLOC_MINALIGN is the minimum kmalloc() objects > alignment. > > Signed-off-by: Catalin Marinas > Cc: Herbert Xu > Cc: "David S. Miller" > --- > include/linux/crypto.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/crypto.h b/include/linux/crypto.h > index 2324ab6f1846..654b9c355575 100644 > --- a/include/linux/crypto.h > +++ b/include/linux/crypto.h > @@ -167,7 +167,7 @@ > * maintenance for non-coherent DMA (cache invalidation in particular) does not > * affect data that may be accessed by the CPU concurrently. > */ > -#define CRYPTO_MINALIGN ARCH_KMALLOC_MINALIGN > +#define CRYPTO_MINALIGN ARCH_DMA_MINALIGN I think this should remain as ARCH_KMALLOC_MINALIGN with the comment above modified. The reason is that we assume memory returned by kmalloc is already aligned to this value. Ard, you added the comment regarding the DMA requirement, so does anything actually rely on this? If they do, they now need to do their own alignment. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt