diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-06-07 10:48:57 +0200 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-06-07 10:48:57 +0200 |
| commit | a964d23c94e8177c501fc9a37dcf1f0dd2750527 (patch) | |
| tree | 0ed074be3f49c598167e3e134a0cc4f0f49b2ea6 /arch/x86/kernel/cpu/intel_epb.c | |
| parent | a61373476127edac8bcc5ee9d68a74dc1b864f53 (diff) | |
| parent | ec527c318036a65a083ef68d8ba95789d2212246 (diff) | |
Merge branch 'pm-x86'
* pm-x86:
x86/power: Fix 'nosmt' vs hibernation triple fault during resume
x86: intel_epb: Do not build when CONFIG_PM is unset
Diffstat (limited to 'arch/x86/kernel/cpu/intel_epb.c')
| -rw-r--r-- | arch/x86/kernel/cpu/intel_epb.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/arch/x86/kernel/cpu/intel_epb.c b/arch/x86/kernel/cpu/intel_epb.c index ebb14a26f117..f4dd73396f28 100644 --- a/arch/x86/kernel/cpu/intel_epb.c +++ b/arch/x86/kernel/cpu/intel_epb.c @@ -97,7 +97,6 @@ static void intel_epb_restore(void) wrmsrl(MSR_IA32_ENERGY_PERF_BIAS, (epb & ~EPB_MASK) | val); } -#ifdef CONFIG_PM static struct syscore_ops intel_epb_syscore_ops = { .suspend = intel_epb_save, .resume = intel_epb_restore, @@ -194,25 +193,6 @@ static int intel_epb_offline(unsigned int cpu) return 0; } -static inline void register_intel_ebp_syscore_ops(void) -{ - register_syscore_ops(&intel_epb_syscore_ops); -} -#else /* !CONFIG_PM */ -static int intel_epb_online(unsigned int cpu) -{ - intel_epb_restore(); - return 0; -} - -static int intel_epb_offline(unsigned int cpu) -{ - return intel_epb_save(); -} - -static inline void register_intel_ebp_syscore_ops(void) {} -#endif - static __init int intel_epb_init(void) { int ret; @@ -226,7 +206,7 @@ static __init int intel_epb_init(void) if (ret < 0) goto err_out_online; - register_intel_ebp_syscore_ops(); + register_syscore_ops(&intel_epb_syscore_ops); return 0; err_out_online: |
