Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6487005rwd; Mon, 19 Jun 2023 08:00:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7jFVq1jg3JbP5Dq2cRGL5lqX4+6wybeEMl0ZnZ0eSAqWDkEggPBhDB7rx09y7nUDc483I7 X-Received: by 2002:a05:6870:c356:b0:1a3:7645:c9c0 with SMTP id e22-20020a056870c35600b001a37645c9c0mr814681oak.18.1687186838643; Mon, 19 Jun 2023 08:00:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687186838; cv=none; d=google.com; s=arc-20160816; b=BZzhKAyGfDn84zNvvEvL3HD32QmNbkwO8RpegZvr/u5O8pltWnhYllxJBT/kDtLxWY Mj/HM/o7980LyApwZy914Sp15BJOLtaUeHY1Xwb0uVnfOsTJfE/Q2mvY9w/84k5EmlVs pTncmx+jlJYtP10QHwDZPiKwVpchrq6ySbTOfR7kDTwGEi2MXuRJwgPrQeuGol+w8NdH vKnwMdkDnvbdv9FOJPv8R6F5lkJJNfuQh8uZf+b3x5jzQC2Z3ikBkbSWba3i1qUnfuJK hEL5ps6bBcIXeXviyFBQfFX4xSD1MC9j/3A5zWF9jW4E6YGMi9CuMpsMKmh75cGwgQfn TuSg== 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=NwbwqFc3AJUQZBKF2WJXJ8rqPXbI9ZcH1YxJWmkBL04=; b=QUdD9Ro2m4Ege9UCwkTtWLr7pkqkj7JrTbONFpCmT8MOGP2M8Ep/bKKEvns3jObHFa SdFLlWfYyhO7danGKdW05Gbq/O69AG9jilE971w0lWIX/pH5szPPeMdJOQ9lH0XVLmzs B0QxnslX+Ghgmp96f+0ShqB8m4rzC499ASezfz6JmPwp7Qi0EZxM9Q3UA2orPyr05Mdb ZnBt0YZo1LlGiLIHOoTcNEvEbDLk0uytm6JUwWgg/GXfyayLb4oCByQzsIISbKlkyH1H OIDX8cFKcAx0vbzU7tfauCxyXs5dFI5iOEMYCUbv6usFbAVKnxrac08ds5zZS/zRmxPr k6UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nE4o48R1; 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 u8-20020a637908000000b0053b8874ceddsi21629523pgc.148.2023.06.19.07.59.56; Mon, 19 Jun 2023 08:00:38 -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=nE4o48R1; 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 S231910AbjFSOpT (ORCPT + 99 others); Mon, 19 Jun 2023 10:45:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbjFSOpS (ORCPT ); Mon, 19 Jun 2023 10:45:18 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A520A90; Mon, 19 Jun 2023 07:45:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687185917; x=1718721917; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=EkDskaH4OoKjAPhDI/G9jXlv2y9BtYKSsvBIWeqjukU=; b=nE4o48R1atWhqNNTg+AtsdtomjvrYPhC1c+9wmgkQW2Lsu0ZUN2kanay pf8q5SNaCVJljf0heE+Z27mfjFAPW+YybWqq8aVfQ49UyN6rZPqhGkIg1 c66wVKkVPUrKcqk6KlLbWY1RMPtiNsUJcuSUwtrreGv2DNl96wNWPZlkR lsBlEUAKbKAm5w6Qil4m4mH0ctkoPdRyv23V0vx7S3OzBx6xot18kIwTZ n8AEPVTF0Bepsit565kfQUzvIZcVeScKRhv8Xl+gtw6KjUNpeku8B/17a F6p86YVyTAIDI7MN8OgH5SEYONPWs1jtpgOuEpHzqfu/J8pXam/H/L+70 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10746"; a="362185007" X-IronPort-AV: E=Sophos;i="6.00,254,1681196400"; d="scan'208";a="362185007" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2023 07:45:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10746"; a="779064994" X-IronPort-AV: E=Sophos;i="6.00,254,1681196400"; d="scan'208";a="779064994" Received: from amujtaba-mobl.ger.corp.intel.com ([10.252.61.238]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2023 07:45:11 -0700 Date: Mon, 19 Jun 2023 17:45:06 +0300 (EEST) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Lukas Wunner cc: 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: <20230616191056.GA30821@wunner.de> Message-ID: References: <20230517105235.29176-1-ilpo.jarvinen@linux.intel.com> <20230517105235.29176-4-ilpo.jarvinen@linux.intel.com> <20230616191056.GA30821@wunner.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1224417959-1687185916=: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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,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-1224417959-1687185916=:1758 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT 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? -- i. --8323329-1224417959-1687185916=:1758--