Skip to content

Commit

Permalink
x86, realmode: Unbreak the ia64 build of drivers/acpi/sleep.c
Browse files Browse the repository at this point in the history
Revert usage of acpi_wakeup_address and move definition
to x86 architecture code in order to make compilation work
in ia64.

[jsakkine: tested compilation in ia64/x86-64 and added
proper commit message]

Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Originally-by: H. Peter Anvin <hpa@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
Link: http://lkml.kernel.org/r/1338370421-27735-1-git-send-email-jarkko.sakkinen@intel.com
Cc: Tony Luck <tony.luck@intel.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
  • Loading branch information
H. Peter Anvin authored and H. Peter Anvin committed May 30, 2012
1 parent 731a737 commit 319b6ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
7 changes: 3 additions & 4 deletions arch/x86/include/asm/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <asm/processor.h>
#include <asm/mmu.h>
#include <asm/mpspec.h>
#include <asm/realmode.h>

#define COMPILER_DEPENDENT_INT64 long long
#define COMPILER_DEPENDENT_UINT64 unsigned long long
Expand Down Expand Up @@ -116,10 +117,8 @@ static inline void acpi_disable_pci(void)
/* Low-level suspend routine. */
extern int acpi_suspend_lowlevel(void);

extern const unsigned char acpi_wakeup_code[];

/* early initialization routine */
extern void acpi_reserve_wakeup_memory(void);
/* Physical address to resume after wakeup */
#define acpi_wakeup_address ((unsigned long)(real_mode_header->wakeup_start))

/*
* Check if the CPU can handle C2 and deeper
Expand Down
8 changes: 2 additions & 6 deletions drivers/acpi/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>

#include <asm/realmode.h>

#include "internal.h"
#include "sleep.h"

Expand Down Expand Up @@ -93,13 +91,11 @@ static struct notifier_block tts_notifier = {
static int acpi_sleep_prepare(u32 acpi_state)
{
#ifdef CONFIG_ACPI_SLEEP
unsigned long wakeup_pa = real_mode_header->wakeup_start;
/* do we have a wakeup address for S2 and S3? */
if (acpi_state == ACPI_STATE_S3) {
if (!wakeup_pa)
if (!acpi_wakeup_address)
return -EFAULT;
acpi_set_firmware_waking_vector(
(acpi_physical_address)wakeup_pa);
acpi_set_firmware_waking_vector(acpi_wakeup_address);

}
ACPI_FLUSH_CPU_CACHE();
Expand Down

0 comments on commit 319b6ff

Please sign in to comment.