Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1616459rwr; Thu, 20 Apr 2023 18:56:58 -0700 (PDT) X-Google-Smtp-Source: AKy350ayeG7eGPJUGgJVrpDZjUDa2n3gnZ9BiVwmZ4On3PgryCmEQ0aS15kslu0WxImLH2mLJeIv X-Received: by 2002:a05:6a20:3952:b0:f2:4d44:3553 with SMTP id r18-20020a056a20395200b000f24d443553mr1908239pzg.54.1682042217944; Thu, 20 Apr 2023 18:56:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682042217; cv=none; d=google.com; s=arc-20160816; b=Z0f1Cui4WWb46wyweqiHO5jr5YHahKbEGLEZVHwdz7c19ojSbUZEaEb+jn6WcJegS+ 3DsTEbDRkAkjbiCIhL4yuGbrJF+MxF5RIfoznS+Qs98FgZz7SWet3kfKYeqfySfb16fO VIakTib0EIgBW/Hi9yyb4gXYrtB2NzrboTrTl+WHPXPJSpQBpfnBNUQpuSaYhwU8B/rT RvutE5Bh1fno+yUDKLwBQ2+MJ14hWzdFvwG3TXEgA0U2gVLetbUsnmgewYbu/aeO9XEG m7X86OICLqGnzcPKcYaU3KcWbBT0i8up8FuCbJKNAy/GVetxIEAlKLpnrxftyVXfVbhI hTWw== 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=K+NzSEA3yWW4vaEGwRD2wVA5+LBknmUPMLT7vR/c9eA=; b=VzeaNm7XeVC0/JTcekqxMitCBwOYZ90TD85HvTqJFvRhj5RZV05xrLBWUEjmlsSwYb INyDUvwhRpg8vViiW0BYKNI1eVkw25Lmt+aBzLgX+Lz3n8BpjzAUNPvgCqYH/SlpVKL7 5us4+dE+bjduTavr2Pv59gBeGe4tDPLXWUsidQSd5KlMN1qRZUkxKWX6LrFsXNfzxN3H 7r3T3Kvj/6hrRdUOh8R4HDp4jjGX3OD6Vkb+Pkn8w1X6arWsJg4R1WXet9xa+kTJ5URM yTFpTbdUEn5yDu/wqGmrUENlnuNa9M+vMLDOp3nHcJVEY72GHEL3RKPmfbOpfm74aGi0 x8wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RSWBlnD2; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 6-20020a621806000000b0063b6bc7df13si2972662pfy.209.2023.04.20.18.56.42; Thu, 20 Apr 2023 18:56:57 -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=@intel.com header.s=Intel header.b=RSWBlnD2; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233380AbjDUBwI (ORCPT + 99 others); Thu, 20 Apr 2023 21:52:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233409AbjDUBwF (ORCPT ); Thu, 20 Apr 2023 21:52:05 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDE5D6EB5; Thu, 20 Apr 2023 18:51:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682041912; x=1713577912; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=qOaIZhCM0M7nCC0PwmJL4rbJwQkhe6qCcFlSkgzP2Os=; b=RSWBlnD2SngH43rjO9rq0WYogV+r0yij3ASnFjEHs56l3mzaiZlJFSJi DwePIYUtXUtGgGHGtnOImF894CtzJDNxCvk1QjR8At3HLsdytcqp1JOHI 1DVE0OfhcKAam6m9P0ErgOB70+nOR2aTExmYR4AVNbxhPqvwdA8bWb5Xq BedIMxnJgJlmsXSwgaT09YzJ3u+j3r+wEfsGq6jXOOcPf5NEMtE0TRkJL BwjnmDxgHyqKPROGnfm3AqzQ2heqnGFebnSEun5HGowKyeOGMj3xbhgs3 3Hdr8hwWBDWihop6pnrvqbH0IBq6W3eJc3fGEolxtSqBQ0X38/By+L1vu w==; X-IronPort-AV: E=McAfee;i="6600,9927,10686"; a="330092938" X-IronPort-AV: E=Sophos;i="5.99,214,1677571200"; d="scan'208";a="330092938" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2023 18:51:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10686"; a="836003730" X-IronPort-AV: E=Sophos;i="5.99,214,1677571200"; d="scan'208";a="836003730" Received: from yilunxu-optiplex-7050.sh.intel.com (HELO localhost) ([10.239.159.165]) by fmsmga001.fm.intel.com with ESMTP; 20 Apr 2023 18:51:49 -0700 Date: Fri, 21 Apr 2023 17:52:19 +0800 From: Xu Yilun To: Lee Jones 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: References: <20230417092653.16487-1-ilpo.jarvinen@linux.intel.com> <20230417092653.16487-5-ilpo.jarvinen@linux.intel.com> <20230420111324.GA970483@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230420111324.GA970483@google.com> X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 2023-04-20 at 12:13:24 +0100, Lee Jones wrote: > 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. Acked-by: Xu Yilun > > -- > Lee Jones [李琼斯]