Hi Rafael
drivers/pci/pci-acpi.c: In function 'acpi_pci_sleep_wake':
drivers/pci/pci-acpi.c:311: error: implicit declaration of function
'acpi_pm_device_sleep_wake'
drivers/pci/pci-acpi.c:
309-static int acpi_pci_sleep_wake(struct pci_dev *dev, bool enable)
310-{
311: int error = acpi_pm_device_sleep_wake(&dev->dev, enable);
include/acpi/acpi_bus.h:
381-#ifdef CONFIG_PM_SLEEP
382-int acpi_pm_device_sleep_state(struct device *, int *);
383:int acpi_pm_device_sleep_wake(struct device *, bool);
384-#else /* !CONFIG_PM_SLEEP */
385-static inline int acpi_pm_device_sleep_state(struct device *d, int *p)
386-{
387- if (p)
388- *p = ACPI_STATE_D0;
389- return ACPI_STATE_D3;
390-}
391-#endif /* !CONFIG_PM_SLEEP */
On Tuesday, 8 of July 2008, Alexander Beregalov wrote:
> Hi Rafael
>
> drivers/pci/pci-acpi.c: In function 'acpi_pci_sleep_wake':
> drivers/pci/pci-acpi.c:311: error: implicit declaration of function
> 'acpi_pm_device_sleep_wake'
I guess this is a compilation with CONFIG_ACPI=y and CONFIG_PM_SLEEP unset.
In that case the appended patch should help. Please test and report back (I
can't test linux-next compilation at the moment).
Thanks,
Rafael
---
From: Rafael J. Wysocki <[email protected]>
PCI ACPI: Fix compilation of pci-acpi.c
Fix compilation of pci-acpi.c with CONFIG_ACPI set and
CONFIG_PM_SLEEP unset.
Signed-off-by: Rafael J. Wysocki <[email protected]>
---
include/acpi/acpi_bus.h | 4 ++++
1 file changed, 4 insertions(+)
Index: linux-next/include/acpi/acpi_bus.h
===================================================================
--- linux-next.orig/include/acpi/acpi_bus.h
+++ linux-next/include/acpi/acpi_bus.h
@@ -388,6 +388,10 @@ static inline int acpi_pm_device_sleep_s
*p = ACPI_STATE_D0;
return ACPI_STATE_D3;
}
+static inline int acpi_pm_device_sleep_wake(struct device *d, bool b)
+{
+ return -ENOSYS;
+}
#endif /* !CONFIG_PM_SLEEP */
#endif /* CONFIG_ACPI */
2008/7/8 Rafael J. Wysocki <[email protected]>:
> On Tuesday, 8 of July 2008, Alexander Beregalov wrote:
>> Hi Rafael
>>
>> drivers/pci/pci-acpi.c: In function 'acpi_pci_sleep_wake':
>> drivers/pci/pci-acpi.c:311: error: implicit declaration of function
>> 'acpi_pm_device_sleep_wake'
>
> I guess this is a compilation with CONFIG_ACPI=y and CONFIG_PM_SLEEP unset.
Indeed.
>
> In that case the appended patch should help. Please test and report back (I
> can't test linux-next compilation at the moment).
Compilation test passed and the kernel can boot.
On Tuesday, 8 of July 2008, Alexander Beregalov wrote:
> 2008/7/8 Rafael J. Wysocki <[email protected]>:
> > On Tuesday, 8 of July 2008, Alexander Beregalov wrote:
> >> Hi Rafael
> >>
> >> drivers/pci/pci-acpi.c: In function 'acpi_pci_sleep_wake':
> >> drivers/pci/pci-acpi.c:311: error: implicit declaration of function
> >> 'acpi_pm_device_sleep_wake'
> >
> > I guess this is a compilation with CONFIG_ACPI=y and CONFIG_PM_SLEEP unset.
> Indeed.
> >
> > In that case the appended patch should help. Please test and report back (I
> > can't test linux-next compilation at the moment).
>
> Compilation test passed and the kernel can boot.
Thanks!
Jesse, could you please apply the patch below to the linux-next branch, on top
of the PCI wake-up patchset?
Rafael
---
From: Rafael J. Wysocki <[email protected]>
PCI ACPI: Fix compilation of pci-acpi.c
Fix compilation of pci-acpi.c with CONFIG_ACPI set and
CONFIG_PM_SLEEP unset.
Signed-off-by: Rafael J. Wysocki <[email protected]>
Tested-by: Alexander Beregalov <[email protected]>
---
include/acpi/acpi_bus.h | 4 ++++
1 file changed, 4 insertions(+)
Index: linux-next/include/acpi/acpi_bus.h
===================================================================
--- linux-next.orig/include/acpi/acpi_bus.h
+++ linux-next/include/acpi/acpi_bus.h
@@ -388,6 +388,10 @@ static inline int acpi_pm_device_sleep_s
*p = ACPI_STATE_D0;
return ACPI_STATE_D3;
}
+static inline int acpi_pm_device_sleep_wake(struct device *d, bool b)
+{
+ return -ENOSYS;
+}
#endif /* !CONFIG_PM_SLEEP */
#endif /* CONFIG_ACPI */
On Tuesday, July 08, 2008 9:58 am Rafael J. Wysocki wrote:
> On Tuesday, 8 of July 2008, Alexander Beregalov wrote:
> > 2008/7/8 Rafael J. Wysocki <[email protected]>:
> > > On Tuesday, 8 of July 2008, Alexander Beregalov wrote:
> > >> Hi Rafael
> > >>
> > >> drivers/pci/pci-acpi.c: In function 'acpi_pci_sleep_wake':
> > >> drivers/pci/pci-acpi.c:311: error: implicit declaration of function
> > >> 'acpi_pm_device_sleep_wake'
> > >
> > > I guess this is a compilation with CONFIG_ACPI=y and CONFIG_PM_SLEEP
> > > unset.
> >
> > Indeed.
> >
> > > In that case the appended patch should help. Please test and report
> > > back (I can't test linux-next compilation at the moment).
> >
> > Compilation test passed and the kernel can boot.
>
> Thanks!
>
> Jesse, could you please apply the patch below to the linux-next branch, on
> top of the PCI wake-up patchset?
>
> Rafael
David sent me one just like this at 7am this morning, just applied and pushed
(along with Alexander's tested-by).
Thanks,
Jesse
On Tuesday, 8 of July 2008, Jesse Barnes wrote:
> On Tuesday, July 08, 2008 9:58 am Rafael J. Wysocki wrote:
> > On Tuesday, 8 of July 2008, Alexander Beregalov wrote:
> > > 2008/7/8 Rafael J. Wysocki <[email protected]>:
> > > > On Tuesday, 8 of July 2008, Alexander Beregalov wrote:
> > > >> Hi Rafael
> > > >>
> > > >> drivers/pci/pci-acpi.c: In function 'acpi_pci_sleep_wake':
> > > >> drivers/pci/pci-acpi.c:311: error: implicit declaration of function
> > > >> 'acpi_pm_device_sleep_wake'
> > > >
> > > > I guess this is a compilation with CONFIG_ACPI=y and CONFIG_PM_SLEEP
> > > > unset.
> > >
> > > Indeed.
> > >
> > > > In that case the appended patch should help. Please test and report
> > > > back (I can't test linux-next compilation at the moment).
> > >
> > > Compilation test passed and the kernel can boot.
> >
> > Thanks!
> >
> > Jesse, could you please apply the patch below to the linux-next branch, on
> > top of the PCI wake-up patchset?
> >
> > Rafael
>
> David sent me one just like this at 7am this morning, just applied and pushed
> (along with Alexander's tested-by).
OK, thanks.
Would you like me to send the Stephen's fix for compilation on ppc64 (CONFIG_PM
unset)?
Rafael
On Tuesday, July 8, 2008 1:29:31 pm Rafael J. Wysocki wrote:
> On Tuesday, 8 of July 2008, Jesse Barnes wrote:
> > David sent me one just like this at 7am this morning, just applied and
> > pushed (along with Alexander's tested-by).
>
> OK, thanks.
>
> Would you like me to send the Stephen's fix for compilation on ppc64
> (CONFIG_PM unset)?
Sure, unless it's already in the ppc tree...
Thanks,
Jesse
On Thursday, 10 of July 2008, Jesse Barnes wrote:
> On Tuesday, July 8, 2008 1:29:31 pm Rafael J. Wysocki wrote:
> > On Tuesday, 8 of July 2008, Jesse Barnes wrote:
> > > David sent me one just like this at 7am this morning, just applied and
> > > pushed (along with Alexander's tested-by).
> >
> > OK, thanks.
> >
> > Would you like me to send the Stephen's fix for compilation on ppc64
> > (CONFIG_PM unset)?
>
> Sure, unless it's already in the ppc tree...
It looks like Stephen had to apply it today too, so I guess it isn't.
Thanks,
Rafael
---
From: Stephen Rothwell <[email protected]>
Subject: [PATCH] pci: include linux/pm_wakeup.h for device_set_wakeup_capable
Signed-off-by: Stephen Rothwell <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
---
drivers/pci/pci.c | 1 +
include/linux/pm_wakeup.h | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index e632a58..3d92b71 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -17,6 +17,7 @@
#include <linux/string.h>
#include <linux/log2.h>
#include <linux/pci-aspm.h>
+#include <linux/pm_wakeup.h>
#include <asm/dma.h> /* isa_dma_bridge_buggy */
#include "pci.h"
diff --git a/include/linux/pm_wakeup.h b/include/linux/pm_wakeup.h
index 3af0c8d..0aae777 100644
--- a/include/linux/pm_wakeup.h
+++ b/include/linux/pm_wakeup.h
@@ -63,6 +63,8 @@ static inline void device_init_wakeup(struct device *dev, int val)
dev->power.can_wakeup = !!val;
}
+static inline void device_set_wakeup_capable(struct device *dev, int val) { }
+
static inline int device_can_wakeup(struct device *dev)
{
return dev->power.can_wakeup;
--
On Wednesday, July 09, 2008 5:16 pm Rafael J. Wysocki wrote:
> On Thursday, 10 of July 2008, Jesse Barnes wrote:
> > On Tuesday, July 8, 2008 1:29:31 pm Rafael J. Wysocki wrote:
> > > On Tuesday, 8 of July 2008, Jesse Barnes wrote:
> > > > David sent me one just like this at 7am this morning, just applied
> > > > and pushed (along with Alexander's tested-by).
> > >
> > > OK, thanks.
> > >
> > > Would you like me to send the Stephen's fix for compilation on ppc64
> > > (CONFIG_PM unset)?
> >
> > Sure, unless it's already in the ppc tree...
>
> It looks like Stephen had to apply it today too, so I guess it isn't.
>
> Thanks,
> Rafael
>
> ---
> From: Stephen Rothwell <[email protected]>
> Subject: [PATCH] pci: include linux/pm_wakeup.h for
> device_set_wakeup_capable
>
> Signed-off-by: Stephen Rothwell <[email protected]>
> Signed-off-by: Rafael J. Wysocki <[email protected]>
Applied to my linux-next branch, thanks.
Jesse