Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp14215708rwb; Sun, 27 Nov 2022 20:06:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf4vwXG3+JDlzklvtbJc0oSJ/GSmhs2tXW86gxuaLCtwa+HnY3+wEmnQHc2rzs6HiXZmD0J8 X-Received: by 2002:a05:6402:910:b0:468:74:9668 with SMTP id g16-20020a056402091000b0046800749668mr27788213edz.394.1669608365720; Sun, 27 Nov 2022 20:06:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669608365; cv=none; d=google.com; s=arc-20160816; b=iIhnoNC/WOAhTuTys6odBh89mbH9SSEToR1mSPcGA9yUX97L3ZZ/bi+3tJfSW2i3JJ wM/pRcjKMGfEqfJPoBnPtIuuG2RkuZErtXK5geA8O6Xfsm9uLOK07mdu+Rygq5tNdR4Z DyignAq2clNv55Z0rTJlx1LoxBt9cP4SvqeKktsJpz35ggH38sufszgfcCoQ+EpfneNQ hYi98/+/jvnZiI6Zvitvvvo9DdfZbE8H68roqHUr5+l3EXAUs6cIz6hz0zHqELKAvZB5 jLqCHl2yMr3oX6yJ0lkMl9IluqVn8Dit9cY7J9z3mMPJKgi+Dc/mOzSI9G5hqt9bEjVi F3Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=ZvAHGzb+wBAH9dwZGyxqq1sLYM+Jye6NZrDj03zyPjI=; b=rTGj02VcBNTEpnx2ODfrgorDkcVZLAHY9izMEXDaVDrlhXA6XVzYEizIrzOFm00NP+ eREqEHcJBF0oq5xC5llAuDNJ/G7wiQ46Dkq2Hj9BKoTSSRPEV2H7dUFsx7EVpoUxHxWx IrUcIQuLYIGl1uLWp9rcerx4YqKKBT44rOk0Yz40ZFpafBHNQm+oStNo+LvIIctiiNbW zB2/boUqJVl8/ZPLWbSFvfeDolRr8fVxX6ki4sHWH9EMRXKGxO2xIXyMsL5iMhyOaX77 5rB08fHCtlS5uONtieMzuKGqhqatM+k52qz1wbOmFZnfgvWGeuDSG5G1mpaMbNK/2iwK 4wuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l15-20020a170906794f00b007ae4717bf18si9657731ejo.156.2022.11.27.20.05.35; Sun, 27 Nov 2022 20:06:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-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; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229593AbiK1EAc (ORCPT + 99 others); Sun, 27 Nov 2022 23:00:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbiK1EAb (ORCPT ); Sun, 27 Nov 2022 23:00:31 -0500 Received: from formenos.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91AB813CDB; Sun, 27 Nov 2022 20:00:27 -0800 (PST) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1ozVJH-001OeH-TB; Mon, 28 Nov 2022 12:00:00 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Mon, 28 Nov 2022 11:59:59 +0800 Date: Mon, 28 Nov 2022 11:59:59 +0800 From: Herbert Xu To: Catalin Marinas Cc: Ard Biesheuvel , Will Deacon , Marc Zyngier , Arnd Bergmann , Greg Kroah-Hartman , Andrew Morton , Linus Torvalds , Linux Memory Management List , Linux ARM , Linux Kernel Mailing List , "David S. Miller" , Linux Crypto Mailing List Subject: Re: [v2 PATCH 2/9] crypto: api - Add crypto_tfm_ctx_dma Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Nov 25, 2022 at 11:31:56AM +0000, Catalin Marinas wrote: > > Is the CRYPTO_DMA_PADDING used anywhere? I couldn't find it in this > series and I'd rather drop it, together with CRYPTO_DMA_ALIGN (see > below). Yes it's used by caam which needs it in a struct initialiser. > We have a generic dma_get_cache_alignment() function which currently is > either 1 or ARCH_DMA_MINALIGN, if the latter is defined. My plan is to > make eventually make this dynamic based on the actual cache line size > (on most arm64 systems it would be 64 rather than 128). So could you use > this instead of defining a CRYPTO_DMA_ALIGN? The only difference would > be that dma_get_cache_alignment() returns 1 rather than > ARCH_KMALLOC_MINALIGN if ARCH_DMA_MINALIGN is not defined, but I don't > think that's an issue. I'm trying to make the driver patches as robotic as possible. We could always improve upon this with driver-specific patches to change the struct initialiser to a run-time assignment to improve things further. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt