From: Randy Dunlap <randy.dunlap@oracle.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
linux-pci@vger.kernel.org
Subject: Re: linux-next: Tree for January 18 (pci + pm)
Date: Wed, 20 Jan 2010 08:53:57 -0800 [thread overview]
Message-ID: <20100120085357.efff0d62.randy.dunlap@oracle.com> (raw)
In-Reply-To: <201001200004.07654.rjw@sisk.pl>
On Wed, 20 Jan 2010 00:04:07 +0100 Rafael J. Wysocki wrote:
> On Tuesday 19 January 2010, Randy Dunlap wrote:
> > On Mon, 18 Jan 2010 19:57:43 +1100 Stephen Rothwell wrote:
> >
> > > Hi all,
> > >
> > > Changes since 20100114:
> >
> >
> > drivers/pci/pci-driver.c: In function 'pci_pm_runtime_resume':
> > drivers/pci/pci-driver.c:991: error: implicit declaration of function 'pci_pm_default_resume_early'
> > drivers/pci/pci-driver.c: At top level:
> > drivers/pci/pci-driver.c:1027: error: 'pci_pm_prepare' undeclared here (not in a function)
> > drivers/pci/pci-driver.c:1028: error: 'pci_pm_complete' undeclared here (not in a function)
> > drivers/pci/pci-driver.c:1029: error: 'pci_pm_suspend' undeclared here (not in a function)
> > drivers/pci/pci-driver.c:1030: error: 'pci_pm_resume' undeclared here (not in a function)
> > drivers/pci/pci-driver.c:1031: error: 'pci_pm_freeze' undeclared here (not in a function)
> > drivers/pci/pci-driver.c:1032: error: 'pci_pm_thaw' undeclared here (not in a function)
> > drivers/pci/pci-driver.c:1033: error: 'pci_pm_poweroff' undeclared here (not in a function)
> > drivers/pci/pci-driver.c:1034: error: 'pci_pm_restore' undeclared here (not in a function)
> > drivers/pci/pci-driver.c:1035: error: 'pci_pm_suspend_noirq' undeclared here (not in a function)
> > drivers/pci/pci-driver.c:1036: error: 'pci_pm_resume_noirq' undeclared here (not in a function)
> > drivers/pci/pci-driver.c:1037: error: 'pci_pm_freeze_noirq' undeclared here (not in a function)
> > drivers/pci/pci-driver.c:1038: error: 'pci_pm_thaw_noirq' undeclared here (not in a function)
> > drivers/pci/pci-driver.c:1039: error: 'pci_pm_poweroff_noirq' undeclared here (not in a function)
> > drivers/pci/pci-driver.c:1040: error: 'pci_pm_restore_noirq' undeclared here (not in a function)
> >
> >
> > partial config:
> >
> > CONFIG_PM=y
> > # CONFIG_PM_DEBUG is not set
> > # CONFIG_SUSPEND is not set
> > # CONFIG_HIBERNATION is not set
> > CONFIG_PM_RUNTIME=y
> > CONFIG_PM_OPS=y
> >
> >
> > Full config is attached.
>
> Ah, too many ifdefs.
>
> Thanks, the patch below fixes that for me.
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Thanks.
> Rafael
>
> ---
> From: Rafael J. Wysocki <rjw@sisk.pl>
> Subject: PCI / PM: Fix compilation for set CONFIG_PM_RUNTIME and CONFIG_PM_SLEEP unset
>
> Fix failure to compile drivers/pci/pci-driver.c for CONFIG_PM_RUNTIME
> set and CONFIG_PM_SLEEP is unset, introduced by the PCI run-time
> power management patches.
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
> ---
> drivers/pci/pci-driver.c | 61 +++++++++++++++++++++++++++--------------------
> 1 file changed, 36 insertions(+), 25 deletions(-)
>
> Index: linux-2.6/drivers/pci/pci-driver.c
> ===================================================================
> --- linux-2.6.orig/drivers/pci/pci-driver.c
> +++ linux-2.6/drivers/pci/pci-driver.c
> @@ -405,6 +405,35 @@ static void pci_device_shutdown(struct d
> pci_msix_shutdown(pci_dev);
> }
>
> +#ifdef CONFIG_PM_OPS
> +
> +/* Auxiliary functions used for system resume and run-time resume. */
> +
> +/**
> + * pci_restore_standard_config - restore standard config registers of PCI device
> + * @pci_dev: PCI device to handle
> + */
> +static int pci_restore_standard_config(struct pci_dev *pci_dev)
> +{
> + pci_update_current_state(pci_dev, PCI_UNKNOWN);
> +
> + if (pci_dev->current_state != PCI_D0) {
> + int error = pci_set_power_state(pci_dev, PCI_D0);
> + if (error)
> + return error;
> + }
> +
> + return pci_restore_state(pci_dev);
> +}
> +
> +static void pci_pm_default_resume_early(struct pci_dev *pci_dev)
> +{
> + pci_restore_standard_config(pci_dev);
> + pci_fixup_device(pci_fixup_resume_early, pci_dev);
> +}
> +
> +#endif
> +
> #ifdef CONFIG_PM_SLEEP
>
> /*
> @@ -521,29 +550,6 @@ static int pci_legacy_resume(struct devi
>
> /* Auxiliary functions used by the new power management framework */
>
> -/**
> - * pci_restore_standard_config - restore standard config registers of PCI device
> - * @pci_dev: PCI device to handle
> - */
> -static int pci_restore_standard_config(struct pci_dev *pci_dev)
> -{
> - pci_update_current_state(pci_dev, PCI_UNKNOWN);
> -
> - if (pci_dev->current_state != PCI_D0) {
> - int error = pci_set_power_state(pci_dev, PCI_D0);
> - if (error)
> - return error;
> - }
> -
> - return pci_restore_state(pci_dev);
> -}
> -
> -static void pci_pm_default_resume_early(struct pci_dev *pci_dev)
> -{
> - pci_restore_standard_config(pci_dev);
> - pci_fixup_device(pci_fixup_resume_early, pci_dev);
> -}
> -
> static void pci_pm_default_resume(struct pci_dev *pci_dev)
> {
> pci_fixup_device(pci_fixup_resume, pci_dev);
> @@ -607,6 +613,13 @@ static void pci_pm_complete(struct devic
> drv->pm->complete(dev);
> }
>
> +#else /* !CONFIG_PM_SLEEP */
> +
> +#define pci_pm_prepare NULL
> +#define pci_pm_complete NULL
> +
> +#endif /* !CONFIG_PM_SLEEP */
> +
> #ifdef CONFIG_SUSPEND
>
> static int pci_pm_suspend(struct device *dev)
> @@ -943,8 +956,6 @@ static int pci_pm_restore(struct device
>
> #endif /* !CONFIG_HIBERNATION */
>
> -#endif /* !CONFIG_PM_SLEEP */
> -
> #ifdef CONFIG_PM_RUNTIME
>
> static int pci_pm_runtime_suspend(struct device *dev)
---
~Randy
next prev parent reply other threads:[~2010-01-20 16:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-18 8:57 linux-next: Tree for January 18 Stephen Rothwell
2010-01-18 14:21 ` [-next Jan 18] Boot failure on s390 with DEVTMPFS=y Sachin Sant
2010-01-18 14:31 ` Kay Sievers
2010-01-19 21:14 ` Greg KH
2010-01-19 23:49 ` Stephen Rothwell
2010-01-18 23:44 ` linux-next: Tree for January 18 (pci + pm) Randy Dunlap
2010-01-19 23:04 ` Rafael J. Wysocki
2010-01-20 4:39 ` Jesse Barnes
2010-01-20 5:20 ` Stephen Rothwell
2010-01-20 16:53 ` Randy Dunlap [this message]
2010-01-28 16:33 ` Randy Dunlap
2010-01-28 19:04 ` Jesse Barnes
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=20100120085357.efff0d62.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=sfr@canb.auug.org.au \
/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).