Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp626164rwr; Thu, 20 Apr 2023 04:25:37 -0700 (PDT) X-Google-Smtp-Source: AKy350ZAjCWMJzjQNssTpm4Um4aHNcMYCpMOiNQccqneJ/W1Y/pGzlb9L1TNm/2zo76Xxxpwx/An X-Received: by 2002:a17:90b:358:b0:247:6eda:a2ae with SMTP id fh24-20020a17090b035800b002476edaa2aemr1353000pjb.32.1681989936887; Thu, 20 Apr 2023 04:25:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681989936; cv=none; d=google.com; s=arc-20160816; b=S7hza9aYao9XLCI/ugE0HGPXjn++wOqXKiTO5hSXJlkxn9bzfQGUdPvdpJ1Ox0Gd/V qKsShs07OlMgfiNoAxArI3fo4KFjYE9D8Wwfig31nuGlam9ricE2Jooi1qHusyxvbBV/ c6JAcBg+MExymgbmzI2oOstx2SqH13YLvKK4khP/iuWo7tpEEKV2/1SgG2Y8WllH5HUZ dPjSPMQtVkNFHDhBU027OXpg7eg3rO8xKeCXsSjqzQ7rT6Nh1MOGC8zETCRbsw5CCsMX 76gPR6QKhOH8TNGdH7RF6Tfx9aV8rqdwScaoK/yKARZ2JwwujKwmLqlMnH2hF1J4D3xr uibg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=IJVM66SGKW+KT8T1UU+tfCtfx/iWQKw/wrnYKSEtemI=; b=gzAlWKjuxN8ZwBNJDOYN0Pfb1/UTI+7vecyTKgJY6qii/Vz1LofS8biS+OavpVjSw3 H85YMP92RdIjUt+e/d8+KzYXxhTlRFETWLbhbxQbzwAYbMH40LbBC3sNb4FzoS2y9AeJ Q8/MAQUny+eH5HRzhyXeNIkZqmq0BljoF+TzElFqMrXHvcZqilS4MHUNAusdDkKOGKrH Y1AAZsJYQ2Js4hKiyi6PsiPJqEuImghxWKvxZcb/uVtcdil7RGOovHrTcL7riLheao/M JDaNkLTZwkLiw7A60zpjI1kSkINg3Hbcctg2yunO657ewfoC9O4pAbGzvns7xMYBz44v MxPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mesjctjm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n13-20020a17090ac68d00b00246fc3d119dsi4126056pjt.67.2023.04.20.04.25.21; Thu, 20 Apr 2023 04:25:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@kernel.org header.s=k20201202 header.b=mesjctjm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232709AbjDTLY5 (ORCPT + 99 others); Thu, 20 Apr 2023 07:24:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234097AbjDTLYh (ORCPT ); Thu, 20 Apr 2023 07:24:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 450434EF6; Thu, 20 Apr 2023 04:23:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AA7A660EE2; Thu, 20 Apr 2023 11:13:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8FBDC433D2; Thu, 20 Apr 2023 11:13:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681989210; bh=83TzyHp1mq1Rphu2Mp/8bCtIaYRo7x0Qx9nQXv5k8Mo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mesjctjmh4x2MfVshQziiYcP9VPUja+3n03zFKwjFShgQ5Cuj1r8B9x2Mkyvh7mmI yWiQWgHLUGHeOfjEoPQYvX1xAiIFXzYS7kpdu9J1MhagXRDm7Z+9JxA962vSj2DclJ kCT5d3rC2cWqMzwbIGNqoP5S4VIyuw5CXn8e+aKEQKgbGku8jQmQn1gGGg/KIe83qe kNXANOU+kPd1O/gFoWBhpVwTfV6AW6MeYVWRRTJX7xMSr81paNJOWn7r4hNFP2H+g5 IqKnuFhBk4W10zfGrGHAHfYJO25bLApSZEj5TCwgcw5rjUm1uIaSgGnJiGPLb1TM3X K+XR5jRKXGpug== Date: Thu, 20 Apr 2023 12:13:24 +0100 From: Lee Jones To: Xu Yilun Cc: Ilpo =?iso-8859-1?Q?J=E4rvinen?= , Wu Hao , Tom Rix , Moritz Fischer , linux-fpga@vger.kernel.org, Jean Delvare , Guenter Roeck , Russ Weight , linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org Subject: Re: [PATCH v3 4/4] mfd: intel-m10-bmc: Manage access to MAX 10 fw handshake registers Message-ID: <20230420111324.GA970483@google.com> References: <20230417092653.16487-1-ilpo.jarvinen@linux.intel.com> <20230417092653.16487-5-ilpo.jarvinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-kernel@vger.kernel.org On Fri, 21 Apr 2023, Xu Yilun wrote: > On 2023-04-17 at 12:26:53 +0300, Ilpo Järvinen wrote: > > On some MAX 10 cards, the BMC firmware is not available to service > > handshake registers during secure update erase and write phases at > > normal speeds. This problem affects at least hwmon driver. When the MAX > > 10 hwmon driver tries to read the sensor values during a secure update, > > the reads are slowed down (e.g., reading all D5005 sensors takes ~24s > > which is magnitudes worse than the normal <0.02s). > > > > Manage access to the handshake registers using a rw semaphore and a FW > > state variable to prevent accesses during those secure update phases > > and return -EBUSY instead. > > > > If handshake_sys_reg_nranges == 0, don't update bwcfw_state as it is not > > used. This avoids the locking cost. > > > > Co-developed-by: Russ Weight > > Signed-off-by: Russ Weight > > Co-developed-by: Xu Yilun > > Signed-off-by: Xu Yilun > > Signed-off-by: Ilpo Järvinen > > Reviewed-by: Xu Yilun > > Hi Lee: > > Could the fpga part also been applied to mfd tree when everyone is good? Yes, with an Acked-by it can. -- Lee Jones [李琼斯]