From: "David E. Box" <david.e.box@linux.intel.com>
To: Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@linux.intel.com>,
Bjorn Helgaas <helgaas@kernel.org>
Cc: Vidya Sagar <vidyas@nvidia.com>,
bhelgaas@google.com, macro@orcam.me.uk, ajayagarwal@google.com,
ilpo.jarvinen@linux.intel.com, hkallweit1@gmail.com,
johan+linaro@kernel.org, xueshuai@linux.alibaba.com,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
treding@nvidia.com, jonathanh@nvidia.com, kthota@nvidia.com,
mmaddireddy@nvidia.com, sagar.tv@gmail.com
Subject: Re: [PATCH V4] PCI/ASPM: Update saved buffers with latest ASPM
Date: Thu, 22 Feb 2024 14:14:58 -0800 [thread overview]
Message-ID: <e5260a4ae90e3907978b47492622678270ad50b7.camel@linux.intel.com> (raw)
In-Reply-To: <057c9a17-bbf2-49c5-b7ee-d3357d5b5100@linux.intel.com>
On Thu, 2024-02-22 at 11:54 -0800, Kuppuswamy Sathyanarayanan wrote:
>
> On 2/22/24 10:54 AM, Bjorn Helgaas wrote:
> > On Thu, Feb 22, 2024 at 10:20:06AM -0800, Kuppuswamy Sathyanarayanan wrote:
> > > On 2/22/24 9:44 AM, Vidya Sagar wrote:
> > > > Many PCIe device drivers save the configuration state of their
> > > > respective
> > > > devices during probe and restore the same when their 'slot_reset' hook
> > > > is called through PCIe Error Recovery Handler.
> > > >
> > > > If the system has a change in ASPM policy after the driver's probe is
> > > > called and before error event occurred, 'slot_reset' hook restores the
> > > > PCIe configuration state to what it was at the time of probe but not to
> > > > what it was just before the occurrence of the error event.
> > > > This effectively leads to a mismatch in the ASPM configuration between
> > > > the device and its upstream parent device.
> > > >
> > > > Update the saved configuration state of the device with the latest info
> > > > whenever there is a change w.r.t ASPM policy.
> > > >
> > > > Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
> > > > ---
> > > > V4:
> > > > * Rebased on top of pci/aspm branch
> > > >
> > > > V3:
> > > > * Addressed sathyanarayanan.kuppuswamy's review comments
> > > >
> > > > V2:
> > > > * Rebased on top of the tree code
> > > > * Addressed Bjorn's review comments
> > > >
> > > > drivers/pci/pcie/aspm.c | 28 ++++++++++++++++++++++++++--
> > > > 3 files changed, 28 insertions(+), 4 deletions(-)
> > > >
> > > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> > > > index cfc5b84dc9c9..3db606ba9344 100644
> > > > --- a/drivers/pci/pci.c
> > > > +++ b/drivers/pci/pci.c
> > > > @@ -1648,7 +1648,7 @@ static int pci_save_pcie_state(struct pci_dev
> > > > *dev)
> > > > pcie_capability_read_word(dev, PCI_EXP_LNKCTL2, &cap[i++]);
> > > > pcie_capability_read_word(dev, PCI_EXP_SLTCTL2, &cap[i++]);
> > > >
> > > > - pci_save_aspm_state(dev);
> > > > + pci_save_aspm_l1ss_state(dev);
> > > > pci_save_ltr_state(dev);
> > > >
> > > > return 0;
> > > > diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
> > > > index b217e74966eb..9fe78eb8b07d 100644
> > > > --- a/drivers/pci/pci.h
> > > > +++ b/drivers/pci/pci.h
> > > > @@ -95,7 +95,7 @@ void pci_msix_init(struct pci_dev *dev);
> > > > bool pci_bridge_d3_possible(struct pci_dev *dev);
> > > > void pci_bridge_d3_update(struct pci_dev *dev);
> > > > void pci_aspm_get_l1ss(struct pci_dev *pdev);
> > > > -void pci_save_aspm_state(struct pci_dev *pdev);
> > > > +void pci_save_aspm_l1ss_state(struct pci_dev *pdev);
> > > is this rename a review request? It is not clear from the commit log
> > > why you are doing it?
> > David's changes already on pci/aspm added pci_save_aspm_state(), but
> > it actually only saves L1SS data, and Vidya needs to save the non-L1SS
> > data also.
> >
> > I think I'm going to rework David's changes a little bit so this is
> > named pci_save_aspm_l1ss_state() from the beginning so we won't need
> > the rename here.
Ack
>
> Got it.
>
> Change wise, this patch looks fine to me.
>
> Reviewed-by: Kuppuswamy Sathyanarayanan
> <sathyanarayanan.kuppuswamy@linux.intel.com>
LGTM too.
Reviewed-by: David E. Box <david.e.box@linux.intel.com>
next prev parent reply other threads:[~2024-02-22 22:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 13:38 [PATCH V1] PCI/ASPM: Update saved buffers with latest ASPM configuration Vidya Sagar
2023-01-25 15:01 ` Wysocki, Rafael J
2023-01-25 17:22 ` Vidya Sagar
2023-01-26 11:43 ` Wysocki, Rafael J
2023-01-26 21:22 ` Sathyanarayanan Kuppuswamy
2023-01-27 20:10 ` Bjorn Helgaas
2023-01-28 18:26 ` Bjorn Helgaas
2024-01-03 10:35 ` [PATCH V2] PCI/ASPM: Update saved buffers with latest ASPM Vidya Sagar
2024-01-03 15:37 ` Kuppuswamy Sathyanarayanan
2024-01-08 12:42 ` [PATCH V3] " Vidya Sagar
2024-02-20 4:07 ` Vidya Sagar
2024-02-20 17:23 ` Bjorn Helgaas
2024-02-22 17:44 ` [PATCH V4] " Vidya Sagar
2024-02-22 18:20 ` Kuppuswamy Sathyanarayanan
2024-02-22 18:54 ` Bjorn Helgaas
2024-02-22 19:54 ` Kuppuswamy Sathyanarayanan
2024-02-22 22:14 ` David E. Box [this message]
2024-02-22 20:59 ` Vidya Sagar
2024-03-05 22:03 ` Bjorn Helgaas
2024-03-05 22:35 ` Kuppuswamy Sathyanarayanan
2024-03-06 1:37 ` David E. Box
2024-03-07 22:01 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e5260a4ae90e3907978b47492622678270ad50b7.camel@linux.intel.com \
--to=david.e.box@linux.intel.com \
--cc=ajayagarwal@google.com \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=hkallweit1@gmail.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=johan+linaro@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=kthota@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=macro@orcam.me.uk \
--cc=mmaddireddy@nvidia.com \
--cc=sagar.tv@gmail.com \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=treding@nvidia.com \
--cc=vidyas@nvidia.com \
--cc=xueshuai@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).