linux/drivers/powercap
Zhang Rui abcfaeb3f5 intel_rapl: Fix module autoloading issue
intel_rapl driver used to have a list of cpuids, which is used to
1. check if the processor support RAPL MSRs
2. do some cpu model specific setting
3. module autoloading

Now, the cpu model specific setting are moved to intel_rapl_common.c as
part of the common code, because the setup is also needed by RAPL MMIO
interface on those platforms.
But removing the cpuid list from intel_rapl MSR interface driver results
in that the driver can not be loaded automatically.

Maintaining another copy of the cpuid list in intel_rapl_msr.c does not make
sense because it increases the complexity when enabling RAPL support on a
new cpu model.

Fix the problem by creating an "intel_rapl_msr" platform device in the
common code, and make RAPL MSR interface driver (intel_rapl_msr.c) probe the
platform device directly.

Reviewed-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
Tested-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-07-11 15:08:58 +02:00
..
idle_inject.c powercap / idle_inject: Add an idle injection framework 2018-07-02 13:00:24 +02:00
intel_rapl_common.c intel_rapl: Fix module autoloading issue 2019-07-11 15:08:58 +02:00
intel_rapl_msr.c intel_rapl: Fix module autoloading issue 2019-07-11 15:08:58 +02:00
Kconfig intel_rapl: abstract RAPL common code 2019-07-11 15:08:58 +02:00
Makefile intel_rapl: abstract RAPL common code 2019-07-11 15:08:58 +02:00
powercap_sys.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 309 2019-06-05 17:37:04 +02:00