#include <linux/suspend.h>
#include <linux/export.h>
#include <linux/smp.h>
#include <linux/perf_event.h>
#include <linux/tboot.h>
#include <linux/dmi.h>
#include <linux/pgtable.h>
#include <asm/proto.h>
#include <asm/mtrr.h>
#include <asm/page.h>
#include <asm/mce.h>
#include <asm/suspend.h>
#include <asm/fpu/api.h>
#include <asm/debugreg.h>
#include <asm/cpu.h>
#include <asm/cacheinfo.h>
#include <asm/mmu_context.h>
#include <asm/cpu_device_id.h>
#include <asm/microcode.h>
#ifdef CONFIG_X86_32
__visible unsigned long saved_context_ebx;
__visible unsigned long saved_context_esp, saved_context_ebp;
__visible unsigned long saved_context_esi, saved_context_edi;
__visible unsigned long saved_context_eflags;
#endif
struct saved_context saved_context;
static void msr_save_context(struct saved_context *ctxt)
{ … }
static void msr_restore_context(struct saved_context *ctxt)
{ … }
static void __save_processor_state(struct saved_context *ctxt)
{ … }
void save_processor_state(void)
{ … }
#ifdef CONFIG_X86_32
EXPORT_SYMBOL(save_processor_state);
#endif
static void do_fpu_end(void)
{ … }
static void fix_processor_context(void)
{ … }
static void notrace __restore_processor_state(struct saved_context *ctxt)
{ … }
void notrace restore_processor_state(void)
{ … }
#ifdef CONFIG_X86_32
EXPORT_SYMBOL(restore_processor_state);
#endif
#if defined(CONFIG_HIBERNATION) && defined(CONFIG_HOTPLUG_CPU)
static void __noreturn resume_play_dead(void)
{ … }
int hibernate_resume_nonboot_cpu_disable(void)
{ … }
#endif
static int bsp_check(void)
{ … }
static int bsp_pm_callback(struct notifier_block *nb, unsigned long action,
void *ptr)
{ … }
static int __init bsp_pm_check_init(void)
{ … }
core_initcall(bsp_pm_check_init);
static int msr_build_context(const u32 *msr_id, const int num)
{ … }
static int msr_initialize_bdw(const struct dmi_system_id *d)
{ … }
static const struct dmi_system_id msr_save_dmi_table[] = …;
static int msr_save_cpuid_features(const struct x86_cpu_id *c)
{ … }
static const struct x86_cpu_id msr_save_cpu_table[] = …;
pm_cpu_match_t;
static int pm_cpu_check(const struct x86_cpu_id *c)
{ … }
static void pm_save_spec_msr(void)
{ … }
static int pm_check_save_msr(void)
{ … }
device_initcall(pm_check_save_msr);