Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1594401ybl; Wed, 8 Jan 2020 21:14:47 -0800 (PST) X-Google-Smtp-Source: APXvYqwNlooxAPr3JV5QIKhb3nsG1stGiNBwnvgAhKeqP9ReB2tdtbd4QIkOWcibsRMQ4zsmZY6q X-Received: by 2002:a9d:5c8a:: with SMTP id a10mr6549957oti.95.1578546886875; Wed, 08 Jan 2020 21:14:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578546886; cv=none; d=google.com; s=arc-20160816; b=CmDTzJ0SPHNLgSr2RZnPBBn91XTz5UA/MyR5Rgq3ELO//tZB12odPfc1IMkdmVg2Li 2yswkLs0pgLiqMCN+K6AzUdWyCdiNrzIHyK4wSzg1Ky1tNtrYOTcHpmXti9w4tG13FDl Oi8G+fZm3PeATqjLUQfBzdYjzi7o5/p7uzGlliRTcawGWqS9AkszQ0iXzZUijcZZ8/ar FhU/2jSPD/M55w39sLxO+L/FFLzj2AMgIjjk5+HQlxsnpqOdKBNkGrwKEqA+rre0W7m4 0wC7IfxWzORcyrcxVu/JmtaEXmSmUSpqE3JuzFpYDgEBAxRp/TLOV+w9B/nZow83ct+p zLsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=HolsW+h5ufhZrPvTKsjwHC9aAPoPNLZIojIw63Fojyw=; b=OqTC8bopTgrit1kFUrLarBkTbZ5GFtedOH4pUyaZc/ITkyY5dShZ6EOL2SRN0LE6bD 8mGlAm5P01DCEwIWiKA1i4yAmtOZ4KVASsJYFd1Q/5MyXxAOmxKqXJGxMS7OdbreYXpJ P5kRM/yh8k3/f2Cii6zeKOJQpX18G0jBdpxRV799l4O/NsmEliUGiTWhEq1Xqq1mfHOR EX/43lkFIqSB3iCdcpMm34a8daq4NL4AFSq19Trc9/qCaVVbD7n+DzWmLdq92WlkZ3pb HIWu/Mxh9vXyXTa/wfMVpzptp4yPvAW25WvWYmn6FP6ybpf2sVsO6oGcfAsFhYN5ovLP sVBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r82si2840313oia.36.2020.01.08.21.14.36; Wed, 08 Jan 2020 21:14:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726393AbgAIFO2 (ORCPT + 99 others); Thu, 9 Jan 2020 00:14:28 -0500 Received: from helcar.hmeau.com ([216.24.177.18]:40400 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725830AbgAIFO2 (ORCPT ); Thu, 9 Jan 2020 00:14:28 -0500 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1ipQ9L-0003Hv-D5; Thu, 09 Jan 2020 13:14:27 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1ipQ9L-0003WS-8G; Thu, 09 Jan 2020 13:14:27 +0800 Date: Thu, 9 Jan 2020 13:14:27 +0800 From: Herbert Xu To: Christian Lamparter Cc: linux-crypto@vger.kernel.org Subject: Re: [PATCH 1/2] crypto: crypto4xx - reduce memory fragmentation Message-ID: <20200109051427.2ojms7r2xonz4esh@gondor.apana.org.au> References: <3913dbe4b3256ead342572f7aba726a60ab5fd43.1577917078.git.chunkeey@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3913dbe4b3256ead342572f7aba726a60ab5fd43.1577917078.git.chunkeey@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Jan 01, 2020 at 11:27:01PM +0100, Christian Lamparter wrote: > With recent kernels (>5.2), the driver fails to probe, as the > allocation of the driver's scatter buffer fails with -ENOMEM. > > This happens in crypto4xx_build_sdr(). Where the driver tries > to get 512KiB (=PPC4XX_SD_BUFFER_SIZE * PPC4XX_NUM_SD) of > continuous memory. This big chunk is by design, since the driver > uses this circumstance in the crypto4xx_copy_pkt_to_dst() to > its advantage: > "all scatter-buffers are all neatly organized in one big > continuous ringbuffer; So scatterwalk_map_and_copy() can be > instructed to copy a range of buffers in one go." > > The PowerPC arch does not have support for DMA_CMA. Hence, > this patch reorganizes the order in which the memory > allocations are done. Since the driver itself is responsible > for some of the issues. > > Signed-off-by: Christian Lamparter > --- > drivers/crypto/amcc/crypto4xx_core.c | 27 +++++++++++++-------------- > 1 file changed, 13 insertions(+), 14 deletions(-) All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt