]> git.baikalelectronics.ru Git - kernel.git/commit
powercap: Invoke powercap_init() and rapl_init() earlier
authorZhang Rui <rui.zhang@intel.com>
Fri, 19 Jul 2019 15:25:14 +0000 (23:25 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 22 Jul 2019 09:23:00 +0000 (11:23 +0200)
commit15484856ff7af02c67a370dc1c88e75814078d54
treedd811e32ff2d9c731ce378496fc8b740d5938480
parent3946fc9291da929ed6836ab79a3b87c34d142954
powercap: Invoke powercap_init() and rapl_init() earlier

The MMIO RAPL interface driver depends on both powercap subsystem and
the intel_rapl_common code.

But when all of them are built-in, the MMIO RAPL interface driver can
be loaded before the other two and this breaks the system during boot.

Fix this by adjusting the init order of the powercap subsystem and the
intel_rapl_common code, so that it can be initialized first.

Fixes: 08b41c164a0a ("int340X/processor_thermal_device: add support for MMIO RAPL")
Reported-by: Kenneth R. Crudup <kenny@panix.com>
Tested-by: Kenneth R. Crudup <kenny@panix.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
[ rjw: Subject & changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/powercap/intel_rapl_common.c
drivers/powercap/powercap_sys.c