Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6594551rwd; Mon, 19 Jun 2023 09:20:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ71cSDFkOx/36ddFgmpt1MceWWQG2IgMqgj8F/xgdgiWVcgkvBBLKF171jSGXSB7MRWt2Z/ X-Received: by 2002:a05:6a20:54a6:b0:122:2c01:9bd2 with SMTP id i38-20020a056a2054a600b001222c019bd2mr1370622pzk.37.1687191654964; Mon, 19 Jun 2023 09:20:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687191654; cv=none; d=google.com; s=arc-20160816; b=D2KbWdNEehAsILpVGTT2r0pf491sVJ9jcbjvmqp0KgCa0eGJUOMI4IngJHSaChY5yv 7qJyx/SbKyV4EclHV5LZGgHdNWBAHLhx4SJJ5VRYte/QDLtsgsCHXqsPfli6TiWgmK79 PqsW2UrGcz4X1Q6iS31cXIquPBFGI3e1XwFz5eInAvXuZxAcmB1Uw98WFmOQr9+Q18Q9 g+TOqbw4SOnHBMGGjILPZqlCVHCQgadePdDQUUUfYPWshekK52RIJkAPfGm/PZASenfY qKAvPcWcWQy53iFcUedQ0Qe/lLhSsIkp6n3HaVwEQNf4PuVjE7weQU43HmET88/ovacW KpYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=ydAFvPip2fxNNjp+f+/lIj1w2ENaYYen7xSfO1KPhJo=; b=LZ/NqTfwqKacWgzudo2J8IfX2U3ksQcjKgcMCsIHWXRttoxDM3OYKd3kBzgrbJMWKh TifGDPzTUWZKJjXr/Zi1HUO96/b3ZX/1jTAHD0WN37maLBRy615blCu0WCyqHWb8wWrN F6tYV/yt6JH+s2448/LwT1Mfq9TIYT7z6rPPNVWAqnJvTigROn5cUGYZj4jrtcxfrdFg AMUDGfd1CvWGNxs/aFq/2RYpzI/Lkrlo2gkJAsN8JCYLxXyAz6z7FgE3FkbAuVZB590I 2zBfkVNq0nR10MR7mWSxjlB6kHqTyyvVTFlAoEReolLnC+F60plfvL7LRI5jomn/NZk+ lExQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HR+6NxKU; 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 p123-20020a625b81000000b006668f12b055si9553753pfb.74.2023.06.19.09.20.40; Mon, 19 Jun 2023 09:20:54 -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=HR+6NxKU; 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 S232147AbjFSQHE (ORCPT + 99 others); Mon, 19 Jun 2023 12:07:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232126AbjFSQHC (ORCPT ); Mon, 19 Jun 2023 12:07:02 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B528F95; Mon, 19 Jun 2023 09:07:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687190820; x=1718726820; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=m+jbbq5rQUt/MAZUXn1lznCro4VPPLa6sXO1lMHLgpQ=; b=HR+6NxKUK7lkuJnFdGcHIFgaRcExmLhAyNFmKKRcfKOcPhn+POQh1R+M AWyK50awYFJao7O2WtNQ9Z0LLwJzQdDyLssuv3gNVkNZam0gAgmgbZHXy OaOu/HGi7nndkuvU0HlQMxux/hmIGXgY7d4BPB9/KyMz+8x9xG+SqUDm3 WUA4igxOY2J8q6EuYQWQdsEfbm7WnNiqNcZi9aI+zsQmaraTeTsfuntRc ug0pT2Z65DOGGM/ZIjKTymP1dSW0pKIm8Zu39CLtDOjgqbrgyiFkG0ew1 I++1nI8UnzSC9WiV3Qrhj9QeNl+73qgFtXc0fqqAUVTCf8lYJ5Teqj0+u Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10746"; a="339278072" X-IronPort-AV: E=Sophos;i="6.00,255,1681196400"; d="scan'208";a="339278072" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2023 09:06:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10746"; a="707938021" X-IronPort-AV: E=Sophos;i="6.00,255,1681196400"; d="scan'208";a="707938021" Received: from ijarvine-mobl2.ger.corp.intel.com ([10.252.61.238]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2023 09:06:53 -0700 Date: Mon, 19 Jun 2023 19:06:51 +0300 (EEST) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Bjorn Helgaas cc: Lukas Wunner , linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Rob Herring , Krzysztof Wilczy??ski , Emmanuel Grumbach , "Rafael J . Wysocki" , Heiner Kallweit , =?ISO-8859-15?Q?Stefan_M=E4tje?= , Andy Shevchenko , Jesse Barnes , Matthew Garrett , Shaohua Li , Thomas Renninger , Greg Kroah-Hartman , LKML , Dean Luick , stable@vger.kernel.org Subject: Re: [PATCH v2 3/9] PCI/ASPM: Use RMW accessors for changing LNKCTL In-Reply-To: <20230619150944.GA8560@bhelgaas> Message-ID: <987455-5d85-ecf1-145c-694b3de96340@linux.intel.com> References: <20230619150944.GA8560@bhelgaas> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1360604632-1687190818=:1758" X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE,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 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1360604632-1687190818=:1758 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT On Mon, 19 Jun 2023, Bjorn Helgaas wrote: > On Mon, Jun 19, 2023 at 05:45:06PM +0300, Ilpo J?rvinen wrote: > > On Fri, 16 Jun 2023, Lukas Wunner wrote: > > > On Wed, May 17, 2023 at 01:52:29PM +0300, Ilpo J?rvinen wrote: > > > > Don't assume that the device is fully under the control of ASPM and use > > > > RMW capability accessors which do proper locking to avoid losing > > > > concurrent updates to the register values. > > > > > > > > If configuration fails in pcie_aspm_configure_common_clock(), the > > > > function attempts to restore the old PCI_EXP_LNKCTL_CCC settings. Store > > > > only the old PCI_EXP_LNKCTL_CCC bit for the relevant devices rather > > > > than the content of the whole LNKCTL registers. It aligns better with > > > > how pcie_lnkctl_clear_and_set() expects its parameter and makes the > > > > code more obvious to understand. > > > [...] > > > > @@ -224,17 +223,14 @@ static bool pcie_retrain_link(struct pcie_link_state *link) > > > > if (!pcie_wait_for_retrain(parent)) > > > > return false; > > > > > > > > - pcie_capability_read_word(parent, PCI_EXP_LNKCTL, ®16); > > > > - reg16 |= PCI_EXP_LNKCTL_RL; > > > > - pcie_capability_write_word(parent, PCI_EXP_LNKCTL, reg16); > > > > + pcie_capability_set_word(parent, PCI_EXP_LNKCTL, PCI_EXP_LNKCTL_RL); > > > > if (parent->clear_retrain_link) { > > > > > > This and several other RMW operations in drivers/pci/pcie/aspm.c > > > are touched by commit b1689799772a ("PCI/ASPM: Use distinct local > > > vars in pcie_retrain_link()") which got applied to pci/enumeration > > > this week: > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/commit/?h=enumeration&id=b1689799772a6f4180f918b0ff66e264a3db9796 > > > > > > As a result the $SUBJECT_PATCH no longer applies cleanly and needs > > > to be respun. > > > > Okay but I'm a bit lost which commit/head in pci repo I should now base > > this series because there's a conflict between pci/aspm and > > pci/enumeration which is not resolved in the repo because pci/enumeration > > hasn't advanced into pci/next yet. Any suggestion? > > Generally speaking I prefer patches based on the PCI "main" branch > (usually -rc1) because I base topic branches on that. If there are > conflicts with other pending material, it's great if you can mention > them, but I can resolve them when applying, so no need to repost just > for that. Just to confirm I'm understanding this correctly... Am I supposed to send a patch whose changelog description and diff do not agree?? (The diff will still modify pcie/aspm.c if it's main-based and the description refers to something more generic as per Lukas' request since the code got moved into pci.c in the enumeration branch). -- i. --8323329-1360604632-1687190818=:1758--