]> git.baikalelectronics.ru Git - kernel.git/commit
x86: intel_epb: Take CONFIG_PM into account
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 9 May 2019 21:28:41 +0000 (23:28 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 10 May 2019 08:47:35 +0000 (10:47 +0200)
commit521f6a350b86ee89b3531daad4e354b373a5d0c7
tree7ce977c8cd154a648b135c6ca01c5253eb14ce71
parentf3233ecd3f401ba32d87b46aaeb09eb5b6b8951a
x86: intel_epb: Take CONFIG_PM into account

Commit fa5133ca1131 ("PM / arch: x86: MSR_IA32_ENERGY_PERF_BIAS sysfs
interface") caused kernels built with CONFIG_PM unset to crash on
systems supporting the Performance and Energy Bias Hint (EPB),
because it attempts to add files to sysfs directories that don't
exist on those systems.

Prevent that from happening by taking CONFIG_PM into account so
that the code depending on it is not compiled at all when it is
not set.

Fixes: fa5133ca1131 ("PM / arch: x86: MSR_IA32_ENERGY_PERF_BIAS sysfs interface")
Reported-by: Ido Schimmel <idosch@mellanox.com>
Tested-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/intel_epb.c