* [PATCH -next] x86/e820: fix build when ACPI is disabled
[not found] <20110112141822.c29314c4.sfr@canb.auug.org.au>
@ 2011-01-12 20:20 ` Randy Dunlap
2011-01-12 20:35 ` Rafael J. Wysocki
0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2011-01-12 20:20 UTC (permalink / raw)
To: Stephen Rothwell, Rafael J. Wysocki
Cc: linux-next, LKML, Jiri Slaby, lenb, linux-acpi
From: Randy Dunlap <randy.dunlap@oracle.com>
Fix build error when CONFIG_ACPI is not enabled:
arch/x86/kernel/e820.c:734: error:implicit declaration of function 'suspend_nvs_register'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
include/linux/acpi.h | 5 +++++
1 file changed, 5 insertions(+)
--- linux-next-20110112.orig/include/linux/acpi.h
+++ linux-next-20110112/include/linux/acpi.h
@@ -360,5 +360,10 @@ static inline int acpi_table_parse(char
{
return -1;
}
+
+static inline int suspend_nvs_register(unsigned long a, unsigned long b)
+{
+ return 0;
+}
#endif /* !CONFIG_ACPI */
#endif /*_LINUX_ACPI_H*/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -next] x86/e820: fix build when ACPI is disabled
2011-01-12 20:20 ` [PATCH -next] x86/e820: fix build when ACPI is disabled Randy Dunlap
@ 2011-01-12 20:35 ` Rafael J. Wysocki
2011-01-12 20:49 ` Randy Dunlap
0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2011-01-12 20:35 UTC (permalink / raw)
To: Randy Dunlap
Cc: Stephen Rothwell, linux-next, LKML, Jiri Slaby, lenb, linux-acpi
On Wednesday, January 12, 2011, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Fix build error when CONFIG_ACPI is not enabled:
>
> arch/x86/kernel/e820.c:734: error:implicit declaration of function 'suspend_nvs_register'
>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> ---
> include/linux/acpi.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> --- linux-next-20110112.orig/include/linux/acpi.h
> +++ linux-next-20110112/include/linux/acpi.h
> @@ -360,5 +360,10 @@ static inline int acpi_table_parse(char
> {
> return -1;
> }
> +
> +static inline int suspend_nvs_register(unsigned long a, unsigned long b)
> +{
> + return 0;
> +}
> #endif /* !CONFIG_ACPI */
> #endif /*_LINUX_ACPI_H*/
I'd prefer the appended patch (it also should fix the problem indicated by Jiri).
Does it work for you?
Rafael
---
drivers/acpi/internal.h | 2 +-
include/linux/acpi.h | 19 ++++++++++---------
2 files changed, 11 insertions(+), 10 deletions(-)
Index: linux-2.6/drivers/acpi/internal.h
===================================================================
--- linux-2.6.orig/drivers/acpi/internal.h
+++ linux-2.6/drivers/acpi/internal.h
@@ -91,7 +91,7 @@ void suspend_nvs_restore(void);
static inline int acpi_sleep_proc_init(void) { return 0; }
static inline int suspend_nvs_alloc(void) { return 0; }
static inline void suspend_nvs_free(void) {}
-static inline int suspend_nvs_save(void) {}
+static inline int suspend_nvs_save(void) { return 0; }
static inline void suspend_nvs_restore(void) {}
#endif
Index: linux-2.6/include/linux/acpi.h
===================================================================
--- linux-2.6.orig/include/linux/acpi.h
+++ linux-2.6/include/linux/acpi.h
@@ -254,15 +254,6 @@ void __init acpi_old_suspend_ordering(vo
void __init acpi_nvs_nosave(void);
#endif /* CONFIG_PM_SLEEP */
-#ifdef CONFIG_ACPI_SLEEP
-int suspend_nvs_register(unsigned long start, unsigned long size);
-#else
-static inline int suspend_nvs_register(unsigned long a, unsigned long b)
-{
- return 0;
-}
-#endif
-
struct acpi_osc_context {
char *uuid_str; /* uuid string */
int rev;
@@ -361,4 +352,14 @@ static inline int acpi_table_parse(char
return -1;
}
#endif /* !CONFIG_ACPI */
+
+#ifdef CONFIG_ACPI_SLEEP
+int suspend_nvs_register(unsigned long start, unsigned long size);
+#else
+static inline int suspend_nvs_register(unsigned long a, unsigned long b)
+{
+ return 0;
+}
+#endif
+
#endif /*_LINUX_ACPI_H*/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -next] x86/e820: fix build when ACPI is disabled
2011-01-12 20:35 ` Rafael J. Wysocki
@ 2011-01-12 20:49 ` Randy Dunlap
2011-01-12 21:03 ` [PATCH] ACPI / PM: Fix build problems for !CONFIG_ACPI related to NVS rework Rafael J. Wysocki
0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2011-01-12 20:49 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Stephen Rothwell, linux-next, LKML, Jiri Slaby, lenb, linux-acpi
On 01/12/11 12:35, Rafael J. Wysocki wrote:
> On Wednesday, January 12, 2011, Randy Dunlap wrote:
>> From: Randy Dunlap <randy.dunlap@oracle.com>
>>
>> Fix build error when CONFIG_ACPI is not enabled:
>>
>> arch/x86/kernel/e820.c:734: error:implicit declaration of function 'suspend_nvs_register'
> I'd prefer the appended patch (it also should fix the problem indicated by Jiri).
>
> Does it work for you?
Yes, both build error and warning are fixed. Thanks.
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ACPI / PM: Fix build problems for !CONFIG_ACPI related to NVS rework
2011-01-12 20:49 ` Randy Dunlap
@ 2011-01-12 21:03 ` Rafael J. Wysocki
2011-01-12 21:12 ` Len Brown
0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2011-01-12 21:03 UTC (permalink / raw)
To: Randy Dunlap
Cc: Stephen Rothwell, linux-next, LKML, Jiri Slaby, lenb, linux-acpi
From: Rafael J. Wysocki <rjw@sisk.pl>
The recent rework of the NVS saving/restoring code introduced two
build issues for !CONFIG_ACPI, a warning in drivers/acpi/internal.h
and an error in arch/x86/kernel/e820.c.
Fix them by providing suitable static inline definitions of the
relevant functions.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
---
drivers/acpi/internal.h | 2 +-
include/linux/acpi.h | 19 ++++++++++---------
2 files changed, 11 insertions(+), 10 deletions(-)
Index: linux-2.6/drivers/acpi/internal.h
===================================================================
--- linux-2.6.orig/drivers/acpi/internal.h
+++ linux-2.6/drivers/acpi/internal.h
@@ -91,7 +91,7 @@ void suspend_nvs_restore(void);
static inline int acpi_sleep_proc_init(void) { return 0; }
static inline int suspend_nvs_alloc(void) { return 0; }
static inline void suspend_nvs_free(void) {}
-static inline int suspend_nvs_save(void) {}
+static inline int suspend_nvs_save(void) { return 0; }
static inline void suspend_nvs_restore(void) {}
#endif
Index: linux-2.6/include/linux/acpi.h
===================================================================
--- linux-2.6.orig/include/linux/acpi.h
+++ linux-2.6/include/linux/acpi.h
@@ -254,15 +254,6 @@ void __init acpi_old_suspend_ordering(vo
void __init acpi_nvs_nosave(void);
#endif /* CONFIG_PM_SLEEP */
-#ifdef CONFIG_ACPI_SLEEP
-int suspend_nvs_register(unsigned long start, unsigned long size);
-#else
-static inline int suspend_nvs_register(unsigned long a, unsigned long b)
-{
- return 0;
-}
-#endif
-
struct acpi_osc_context {
char *uuid_str; /* uuid string */
int rev;
@@ -361,4 +352,14 @@ static inline int acpi_table_parse(char
return -1;
}
#endif /* !CONFIG_ACPI */
+
+#ifdef CONFIG_ACPI_SLEEP
+int suspend_nvs_register(unsigned long start, unsigned long size);
+#else
+static inline int suspend_nvs_register(unsigned long a, unsigned long b)
+{
+ return 0;
+}
+#endif
+
#endif /*_LINUX_ACPI_H*/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ACPI / PM: Fix build problems for !CONFIG_ACPI related to NVS rework
2011-01-12 21:03 ` [PATCH] ACPI / PM: Fix build problems for !CONFIG_ACPI related to NVS rework Rafael J. Wysocki
@ 2011-01-12 21:12 ` Len Brown
0 siblings, 0 replies; 5+ messages in thread
From: Len Brown @ 2011-01-12 21:12 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Randy Dunlap, Stephen Rothwell, linux-next, LKML, Jiri Slaby,
linux-acpi
applied
thanks,
Len Brown, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-01-12 21:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20110112141822.c29314c4.sfr@canb.auug.org.au>
2011-01-12 20:20 ` [PATCH -next] x86/e820: fix build when ACPI is disabled Randy Dunlap
2011-01-12 20:35 ` Rafael J. Wysocki
2011-01-12 20:49 ` Randy Dunlap
2011-01-12 21:03 ` [PATCH] ACPI / PM: Fix build problems for !CONFIG_ACPI related to NVS rework Rafael J. Wysocki
2011-01-12 21:12 ` Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox