2012-05-30 06:26:05

by Sakkinen, Jarkko

[permalink] [raw]
Subject: [PATCH] x86, realmode: ia64 build fix (drivers/acpi/sleep.c)

From: Jarkko Sakkinen <Jarkko Sakkinen [email protected]>

Added CONFIG_ACPI_SLEEP caging for #include <asm/realmode.h>.

Signed-off-by: Jarkko Sakkinen <Jarkko Sakkinen [email protected]>
---
drivers/acpi/sleep.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index a82fbf6..5b99f64 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -25,7 +25,9 @@
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>

+#ifdef CONFIG_ACPI_SLEEP
#include <asm/realmode.h>
+#endif

#include "internal.h"
#include "sleep.h"
--
1.7.9.5


2012-05-30 06:48:02

by H. Peter Anvin

[permalink] [raw]
Subject: Re: [PATCH] x86, realmode: ia64 build fix (drivers/acpi/sleep.c)

On 05/29/2012 11:26 PM, Jarkko Sakkinen wrote:
> From: Jarkko Sakkinen <Jarkko Sakkinen [email protected]>
>
> Added CONFIG_ACPI_SLEEP caging for #include <asm/realmode.h>.
>
> Signed-off-by: Jarkko Sakkinen <Jarkko Sakkinen [email protected]>
> ---
> drivers/acpi/sleep.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
> index a82fbf6..5b99f64 100644
> --- a/drivers/acpi/sleep.c
> +++ b/drivers/acpi/sleep.c
> @@ -25,7 +25,9 @@
> #include <acpi/acpi_bus.h>
> #include <acpi/acpi_drivers.h>
>
> +#ifdef CONFIG_ACPI_SLEEP
> #include <asm/realmode.h>
> +#endif
>
> #include "internal.h"
> #include "sleep.h"

We rarely want to do things this way, because it masks build problems.
The right way to do this is the way it was before
c9b77ccb52a5c77233b0e557b7d4417b00ef4012, where the dependency on the
trampoline code was located in an architecture-specific asm header.

ia64 actually still has acpi_wakeup_address defined, although it seems
to always be zero.

So I would say the right thing is more along the lines of the attached
(and totally untested) patch.

Also, your SOB line is messed up.




Attachments:
diff (1.62 kB)