Skip to content
Commit 220a65d7 authored by Lukasz Luba's avatar Lukasz Luba Committed by Ionela Voinescu
Browse files

PM / EM: postpone creating the debugfs dir till fs_initcall



The debugfs directory '/sys/kernel/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: 56348560 ("debugfs: do not attempt to create a new file before the filesystem is initalized")
Reported-by: Ionela Voinescu's avatarIonela Voinescu <ionela.voinescu@arm.com>
Signed-off-by: Lukasz Luba's avatarLukasz Luba <lukasz.luba@arm.com>
parent 3cde34a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment