From: Bjorn Helgaas <helgaas@kernel.org>
To: linux-pci@vger.kernel.org,
Stefano Stabellini <sstabellini@kernel.org>,
KarimAllah Ahmed <karahmed@amazon.de>
Cc: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH 4/6] xen-platform: Convert to generic power management
Date: Tue, 5 Nov 2019 15:51:29 -0600 [thread overview]
Message-ID: <20191105215129.GA36983@google.com> (raw)
In-Reply-To: <20191104152330.GA104689@google.com>
On Mon, Nov 04, 2019 at 09:23:30AM -0600, Bjorn Helgaas wrote:
> On Fri, Nov 01, 2019 at 03:45:56PM -0500, Bjorn Helgaas wrote:
> > From: Bjorn Helgaas <bhelgaas@google.com>
> >
> > Convert xen-platform from the legacy PCI power management callbacks to the
> > generic operations. This is one step towards removing support for the
> > legacy PCI callbacks.
> >
> > The generic .resume_noirq() operation is called by pci_pm_resume_noirq() at
> > the same point the legacy PCI .resume_early() callback was, so this patch
> > should not change the xen-platform behavior.
> >
> > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
>
> I made the tweak below to fix the compile error. I could swear I
> built this, but I must have been mistaken.
>
> > Cc: Stefano Stabellini <sstabellini@kernel.org>
> > Cc: KarimAllah Ahmed <karahmed@amazon.de>
I applied this to pci/pm for v5.5 as part of the larger series:
https://lore.kernel.org/r/20191101204558.210235-1-helgaas@kernel.org
> > ---
> > drivers/xen/platform-pci.c | 10 +++++++---
> > 1 file changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
> > index 5e30602fdbad..e06e8769eb84 100644
> > --- a/drivers/xen/platform-pci.c
> > +++ b/drivers/xen/platform-pci.c
> > @@ -168,13 +168,17 @@ static const struct pci_device_id platform_pci_tbl[] = {
> > {0,}
> > };
> >
> > +static struct dev_pm_ops platform_pm_ops = {
> > + .resume_noirq = platform_pci_resume,
> > +};
> > +
> > static struct pci_driver platform_driver = {
> > .name = DRV_NAME,
> > .probe = platform_pci_probe,
> > .id_table = platform_pci_tbl,
> > -#ifdef CONFIG_PM
> > - .resume_early = platform_pci_resume,
> > -#endif
> > + .driver = {
> > + .pm = &platform_pm_ops,
> > + },
> > };
> >
> > builtin_pci_driver(platform_driver);
> > --
> > 2.24.0.rc1.363.gb1bccd3e3d-goog
>
> diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
> index e06e8769eb84..59e85e408c23 100644
> --- a/drivers/xen/platform-pci.c
> +++ b/drivers/xen/platform-pci.c
> @@ -74,7 +74,7 @@ static int xen_allocate_irq(struct pci_dev *pdev)
> "xen-platform-pci", pdev);
> }
>
> -static int platform_pci_resume(struct pci_dev *pdev)
> +static int platform_pci_resume(struct device *dev)
> {
> int err;
>
> @@ -83,7 +83,7 @@ static int platform_pci_resume(struct pci_dev *pdev)
>
> err = xen_set_callback_via(callback_via);
> if (err) {
> - dev_err(&pdev->dev, "platform_pci_resume failure!\n");
> + dev_err(dev, "platform_pci_resume failure!\n");
> return err;
> }
> return 0;
next prev parent reply other threads:[~2019-11-05 21:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-01 20:45 [PATCH 0/6] PCI/PM: Minor fix and cleanups Bjorn Helgaas
2019-11-01 20:45 ` [PATCH 1/6] PCI/PM: Apply D2 delay as milliseconds, not microseconds Bjorn Helgaas
2019-11-04 10:29 ` Rafael J. Wysocki
2019-11-01 20:45 ` [PATCH 2/6] PCI/PM: Expand PM reset messages to mention D3hot (not just D3) Bjorn Helgaas
2019-11-04 10:29 ` Rafael J. Wysocki
2019-11-01 20:45 ` [PATCH 3/6] PCI/PM: Simplify pci_set_power_state() Bjorn Helgaas
2019-11-04 10:31 ` Rafael J. Wysocki
2019-11-01 20:45 ` [PATCH 4/6] xen-platform: Convert to generic power management Bjorn Helgaas
2019-11-04 10:32 ` Rafael J. Wysocki
2019-11-04 15:23 ` Bjorn Helgaas
2019-11-05 21:51 ` Bjorn Helgaas [this message]
2019-11-01 20:45 ` [PATCH 5/6] PCI/PM: Remove unused pci_driver.resume_early() hook Bjorn Helgaas
2019-11-04 10:33 ` Rafael J. Wysocki
2019-11-01 20:45 ` [PATCH 6/6] PCI/PM: Remove unused pci_driver.suspend_late() hook Bjorn Helgaas
2019-11-04 10:34 ` Rafael J. Wysocki
2019-11-05 21:52 ` [PATCH 0/6] PCI/PM: Minor fix and cleanups 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=20191105215129.GA36983@google.com \
--to=helgaas@kernel.org \
--cc=karahmed@amazon.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=sstabellini@kernel.org \
/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).