[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220902233233.GA390494@bhelgaas>
Date: Fri, 2 Sep 2022 18:32:33 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Sathyanarayanan Kuppuswamy
<sathyanarayanan.kuppuswamy@...ux.intel.com>
Cc: Kai-Heng Feng <kai.heng.feng@...onical.com>,
Rajvi Jingar <rajvi.jingar@...ux.intel.com>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Koba Ko <koba.ko@...onical.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
"David E . Box" <david.e.box@...ux.intel.com>,
linux-pci@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [PATCH 1/4] PCI/PTM: Preserve PTM Root Select
On Fri, Sep 02, 2022 at 02:11:12PM -0700, Sathyanarayanan Kuppuswamy wrote:
> On 9/2/22 1:38 PM, Bjorn Helgaas wrote:
> > On Fri, Sep 02, 2022 at 10:24:05AM -0700, Sathyanarayanan Kuppuswamy wrote:
> >> On 9/2/22 7:58 AM, Bjorn Helgaas wrote:
> >>> From: Bjorn Helgaas <bhelgaas@...gle.com>
> >>>
> >>> When disabling PTM, there's no need to clear the Root Select bit. We
> >>> disable PTM during suspend, and we want to re-enable it during resume.
> >>> Clearing Root Select here makes re-enabling more complicated.
> >>
> >> Currently, it looks like we disable PCI_PTM_CTRL_ROOT in pci_disable_ptm(),
> >> but not enable it in pci_enable_ptm(). Do you know this did not trigger an
> >> issue?
> ...
> > Thanks for asking this, because it reminds me why I didn't add
> > pci_enable_ptm() calls in the resume paths! That would make them
> > parallel with the suspend paths, which would definitely be nice. But
> > we would have to rework pci_enable_ptm() to work for Root Ports and
> > Switch Ports as well. I think we *could* do that. What do you think?
>
> IMO, the code will look better if we keep the suspend and resume paths in
> sync. Since we are calling pci_disable_ptm() in suspend path, it makes
> sense to call pci_enable_ptm() in resume path.
>
> Making the pci_enable_ptm() handle root and upstream ports should not
> be very complicated, right?
I took a stab at it. pci_enable_ptm() is getting kind of ugly, but
maybe it's better overall. I'll post it and you can see what you
think.
Powered by blists - more mailing lists