Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1812775rwd; Mon, 15 May 2023 03:29:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ48JUk1MLhC5JGRhybApInTFyET5FhZfH5roLNLAbJgNHVQCxj2wvx6RiWjAXVdHtcT8CRl X-Received: by 2002:a05:6a00:15d1:b0:643:857d:87a3 with SMTP id o17-20020a056a0015d100b00643857d87a3mr46785125pfu.11.1684146589591; Mon, 15 May 2023 03:29:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684146589; cv=none; d=google.com; s=arc-20160816; b=pzXAIGZubzDV5jvU8Tc2IxxFt8l0CqQLbqLfhtP2CDPP8k9Nv5HaeFp1J5yK3+XMPZ JDwnRpRyhCfH9BpAtii1S4+0bviYgR0RXlVjN9pYpoKxaeygsIp7BLE9enKijRZ2f0q2 hEdYFMVaf8OQsxZ4oiGgQXmucTw8af+RUmIhKtSHcvv0OikHgTeOYBEHdpF/4hvu7rU7 ZfMUydi3aAXJX2zV3XQtuWajDdLIRJl+uJKn/h00Iv5ZZOXmIheVdixoaxfzxibOqNvf pnDRq4LpscJz5wgeuSTt6IRVsjIabSSJD52GlQhhuxhBblm1cDOcusgD6AKCjOw8iP5L EiEg== 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=thfjrFP7CSv9Xd5ktQ/4IeXPBVVSWuuw5K1cLoYwvHM=; b=M8eeyLVKaBylonwbLAgRWJupG+NUWlfr3bla8FOodB+63LmISIUHh8rR+oRTN4RnwX 22iBEgPJKr2K6lpInOb1nn3sbZhMO4rJg1gUuk2DzUNqiOQZuf1dPUtv3+QBIleaa2KX xWagpOeWRHfZFur1ku/ldL6c7IWgL8rJ8K3DxNy21JrB2bg2tTo4ycBADbALQLPbd7eq QWrTl0I4/vuHsFMMwzTo39OtX/9Yzfpi1Yevya1n19G6Ti3pBKlBb9LxxmeTETTwWTU0 69hTeZskn1e9L27DToH3ClqKPEZCcw1tSdU1n1Jt2s+gSd326QCygwUH0cByNH3dkKrY GZ4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QJFmBO29; 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 h8-20020aa796c8000000b00643a2b0c6c8si16625200pfq.106.2023.05.15.03.29.37; Mon, 15 May 2023 03:29:49 -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=QJFmBO29; 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 S238913AbjEOKH0 (ORCPT + 99 others); Mon, 15 May 2023 06:07:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239649AbjEOKHG (ORCPT ); Mon, 15 May 2023 06:07:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96A8426A5; Mon, 15 May 2023 03:06:22 -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 2A319621FD; Mon, 15 May 2023 10:06:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E70CBC433D2; Mon, 15 May 2023 10:06:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684145181; bh=8ayaAuYB/kceB1weTjmH44O2MoHflgKCJFCWUHfcFQs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QJFmBO2914iPhBK2y/pzhOn8EsqM4aJVDlSeAie995e5GJqyMiOnO1xylkfUxsxuM Mw5ZVuZp5+y1dqPz5szkFxCI5PfuF7PIz33EQAz2jVPH3c/BHmyY5pSd9DOJeKOV6Z jd1WAmg5kynCKeVjCdMCE+swyrKmolI2pjUFO2+GtCLCmD7XGiYduQQmc8A6p2P+Kw yTMtLfrQbQ0OIKdf9ZOMFfBAZyJRcd2MPf6AaImpaCHqRhl2YGZz0+kbr0xq0H3Vit 9x9KhzkN8AmOcWBe7wUCHl/6D4tuPBRXn6mZzWScR9xrbrKViRrwyW5fswxLHhkIrp 11WpIBcFgoUKg== Date: Mon, 15 May 2023 11:06:15 +0100 From: Lee Jones To: Ilpo =?iso-8859-1?Q?J=E4rvinen?= Cc: Xu Yilun , Wu Hao , Tom Rix , Moritz Fischer , linux-fpga@vger.kernel.org, Jean Delvare , Guenter Roeck , Russ Weight , LKML , 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: <20230515100615.GH8963@google.com> References: <20230417092653.16487-1-ilpo.jarvinen@linux.intel.com> <20230417092653.16487-5-ilpo.jarvinen@linux.intel.com> <20230427150712.GV50521@google.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=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Wed, 10 May 2023, Ilpo Järvinen wrote: > On Thu, 27 Apr 2023, Lee Jones wrote: > > On Mon, 17 Apr 2023, 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 > > > --- > > > drivers/fpga/intel-m10-bmc-sec-update.c | 17 +++++-- > > > drivers/mfd/intel-m10-bmc-core.c | 67 ++++++++++++++++++++++++- > > > drivers/mfd/intel-m10-bmc-spi.c | 14 ++++++ > > > include/linux/mfd/intel-m10-bmc.h | 28 +++++++++++ > > > 4 files changed, 121 insertions(+), 5 deletions(-) > > > > Applied, thanks > > Did these end up falling throught the cracks as I've not been able to > locate where they were applied? They've been in -next for a couple of weeks. -- Lee Jones [李琼斯]