Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp271930imn; Wed, 27 Jul 2022 23:22:28 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uF64WDL6zRVM5/Q85px2CGI+d69DNYEzyF9Xufqf+JDJAeHJPsYkeXj9gPIipJF6zaseyX X-Received: by 2002:a17:90a:f409:b0:1f2:fb4f:7f48 with SMTP id ch9-20020a17090af40900b001f2fb4f7f48mr8568267pjb.191.1658989347928; Wed, 27 Jul 2022 23:22:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658989347; cv=none; d=google.com; s=arc-20160816; b=jBlw4LFpcH2LVB5hGefZbZaKOoUwAr6dwKfJ0zDF+dmRsoxsqE9OhSKxx+JS/QOk3e iI27dVcZeSlSIJcDhQXgXhE85H0FHAqOYsToziF/Q3XHNpracPkjH6DVKmC2XsyIcr+a rEKTGg2IGbYuouVRyckGZbhTHLYxzwLCetm/ZhlJFRtJxtWC9V6pPbae9JCYIKhHCtjP zqYlzsjZ+3radjEWsFTEcdpQdXfd4C5T2K1Dl4tekm8G0o4iN1uNj//D+75WBrlSfR4j JP6FgyJQHD4kHIRc4jj+xCLxHDKWq2ybZX/D9Cz5iRbNtndERyrIPpD1bPTBSj7w3Iv6 M8GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-filter; bh=dOWYO9Tc9My88lpKym2V9t4KyEwrpWAjOIRXvs4C5XQ=; b=bf9dqVjF/4ZUZgA5MSOtMFonH7KZtLNxpFTbxajvqIRMJOdlRW7hXCHSnCAHxlEpmZ /pGrR0cOSk1grUFLHOHMrTetRGjsoIkw+GrMvpSWv9smw4XA9aLweTRAjWZlRNyRq+LB T69GrbwjnGVptZIT+Mfff4XJ2U7NwGnjGLB/Yi9j6rkrm1mB1+AKb2ZAAer4Py1lml/W XLQh9uc4GiVd/uxmJYHMW4elt9A8iB+v/YSX7i9LewAePYRFbx+3ElnK4AjD0s/Dp0HC JhHcuylnabH1HSVctvNZ+lediJVEJiel0qrfEe6tKbxMs/jzdLpYAgWA18acm1hZ2zUE e2xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=Ak0uQ40x; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h14-20020a170902f70e00b0016d47244b85si161164plo.327.2022.07.27.23.21.59; Wed, 27 Jul 2022 23:22:27 -0700 (PDT) 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; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=Ak0uQ40x; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233442AbiG1GSZ (ORCPT + 99 others); Thu, 28 Jul 2022 02:18:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233781AbiG1GSY (ORCPT ); Thu, 28 Jul 2022 02:18:24 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DCA115D0F2; Wed, 27 Jul 2022 23:18:22 -0700 (PDT) Received: from [192.168.87.140] (unknown [50.47.106.71]) by linux.microsoft.com (Postfix) with ESMTPSA id 18D4620FE86F; Wed, 27 Jul 2022 23:18:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 18D4620FE86F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1658989102; bh=dOWYO9Tc9My88lpKym2V9t4KyEwrpWAjOIRXvs4C5XQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Ak0uQ40xJOJRfAIrFUYHIr9TFMyUDjJbJTZm6CGUkKy+4qOq8U56I8c+XrKWgMQ8B csdkyl9vpQCSv5JuJFTpnLAuSRIlKNFG4wOc1us79zruuwJNmDK1gCUlFhLZtlZyG7 wGUvBV/uHTBcB+UTdH5KjjtwmuxD2IG+4K95CEvI= Message-ID: <450dee2f-63bf-51a7-730e-b780b594c1c5@linux.microsoft.com> Date: Wed, 27 Jul 2022 23:18:22 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v8 5/5] crypto: aspeed: add HACE crypto driver Content-Language: en-US To: Neal Liu , Corentin Labbe , Christophe JAILLET , Randy Dunlap , Herbert Xu , "David S . Miller" , Rob Herring , Krzysztof Kozlowski , Joel Stanley , Andrew Jeffery , Johnny Huang Cc: "linux-aspeed@lists.ozlabs.org" , "linux-crypto@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , BMC-SW References: <20220726113448.2964968-1-neal_liu@aspeedtech.com> <20220726113448.2964968-6-neal_liu@aspeedtech.com> <9d6beefe-9974-22f8-750c-68c9acb707ab@linux.microsoft.com> From: Dhananjay Phadke In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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 7/26/2022 10:31 PM, Neal Liu wrote: >> Why are separate options required for hash and crypto algorithms, if hace is >> only hw crypto on the SoCs? >> >> Looks like that's requiring unnecessary __weak register / unregister functions >> [see below]. >> >> Couldn't just two options CONFIG_CRYPTO_DEV_ASPEED and >> CONFIG_CRYPTO_DEV_ASPEED_DEBUG be simpler to set for downstream >> defconfigs? > I would like to separate different algorithms by different options for more convenient for further use and debug. > We also have RSA engine named ACRY, and would upstream once hash & crypto being accepted. > So combined them into one option seems not a good choice for multiple hw crypto, do you agree? Not sure what's the use case of just enabling crypto or hash separately out of same HW engine and esp. when there's no alternative accel available, but that's fine. If ARCY is different HW engine (interface) then having separate config sounds logical. Multiplying DEBUG configs seems unnecessary though. With dynamic debug any of the dev_dbg could be turned on. Suggest using single one for the module, if not drop it altogether. Following code is still not covered by Kconfig, it in common code. > +#ifdef ASPEED_HACE_DEBUG > +#define HACE_DBG(d, fmt, ...) \ > + dev_info((d)->dev, "%s() " fmt, __func__, ##__VA_ARGS__) > +#else > +#define HACE_DBG(d, fmt, ...) \ > + dev_dbg((d)->dev, "%s() " fmt, __func__, ##__VA_ARGS__) > +#endif Regards, Dhananjay