mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
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: 555c45fe0d
("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>
This commit is contained in:
parent
5f9e832c13
commit
f76cb066ed
@ -1454,7 +1454,7 @@ static void __exit rapl_exit(void)
|
||||
unregister_pm_notifier(&rapl_pm_notifier);
|
||||
}
|
||||
|
||||
module_init(rapl_init);
|
||||
fs_initcall(rapl_init);
|
||||
module_exit(rapl_exit);
|
||||
|
||||
MODULE_DESCRIPTION("Intel Runtime Average Power Limit (RAPL) common code");
|
||||
|
@ -671,7 +671,7 @@ static int __init powercap_init(void)
|
||||
return class_register(&powercap_class);
|
||||
}
|
||||
|
||||
device_initcall(powercap_init);
|
||||
fs_initcall(powercap_init);
|
||||
|
||||
MODULE_DESCRIPTION("PowerCap sysfs Driver");
|
||||
MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>");
|
||||
|
Loading…
Reference in New Issue
Block a user