linux/kernel/power
Lukasz Luba fb9d62b27a PM: EM: postpone creating the debugfs dir till fs_initcall
The debugfs directory '/sys/kernel/debug/energy_model' is needed before
the Energy Model registration can happen. With the recent change in
debugfs subsystem it's not allowed to create this directory at early
stage (core_initcall). Thus creating this directory would fail.

Postpone the creation of the EM debug dir to later stage: fs_initcall.

It should be safe since all clients: CPUFreq drivers, Devfreq drivers
will be initialized in later stages.

The custom debug log below prints the time of creation the EM debug dir
at fs_initcall and successful registration of EMs at later stages.

[    1.505717] energy_model: creating rootdir
[    3.698307] cpu cpu0: EM: created perf domain
[    3.709022] cpu cpu1: EM: created perf domain

Fixes: 56348560d4 ("debugfs: do not attempt to create a new file before the filesystem is initalized")
Reported-by: Ionela Voinescu <ionela.voinescu@arm.com>
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2021-03-23 19:53:48 +01:00
..
Kconfig PM: Kconfig: remove unneeded "default n" options 2021-02-12 16:43:23 +01:00
Makefile
autosleep.c
console.c
energy_model.c PM: EM: postpone creating the debugfs dir till fs_initcall 2021-03-23 19:53:48 +01:00
hibernate.c
main.c PM: sleep: Constify static struct attribute_group 2021-02-12 16:46:59 +01:00
power.h
poweroff.c
process.c PM: sleep: No need to check PF_WQ_WORKER in thaw_kernel_threads() 2021-01-27 19:20:17 +01:00
qos.c
snapshot.c
suspend.c
suspend_test.c
swap.c
user.c
wakelock.c