summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/acpi.h
diff options
context:
space:
mode:
authorSean Christopherson <sean.j.christopherson@intel.com>2019-11-26 17:54:16 +0100
committerIngo Molnar <mingo@kernel.org>2019-12-10 10:15:48 +0100
commit8c53b318b222eff55d2900b554094a099b1a30f6 (patch)
treeeeee7f57178086e00a21befe9bd4c577230218dc /arch/x86/include/asm/acpi.h
parentx86/ACPI/sleep: Remove an unnecessary include of asm/realmode.h (diff)
downloadlinux-8c53b318b222eff55d2900b554094a099b1a30f6.tar.xz
linux-8c53b318b222eff55d2900b554094a099b1a30f6.zip
ACPI/sleep: Convert acpi_wakeup_address into a function
Convert acpi_wakeup_address from a raw variable into a function so that x86 can wrap its dereference of the real mode boot header in a function instead of broadcasting it to the world via a #define. This sets the stage for a future patch to move x86's definition of the new function, acpi_get_wakeup_address(), out of asm/acpi.h and thus break acpi.h's dependency on asm/realmode.h. No functional change intended. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Link: https://lkml.kernel.org/r/20191126165417.22423-12-sean.j.christopherson@intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/acpi.h')
-rw-r--r--arch/x86/include/asm/acpi.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index bc9693c9107e..23ffafd927a1 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -62,7 +62,10 @@ static inline void acpi_disable_pci(void)
extern int (*acpi_suspend_lowlevel)(void);
/* Physical address to resume after wakeup */
-#define acpi_wakeup_address ((unsigned long)(real_mode_header->wakeup_start))
+static inline unsigned long acpi_get_wakeup_address(void)
+{
+ return ((unsigned long)(real_mode_header->wakeup_start));
+}
/*
* Check if the CPU can handle C2 and deeper