]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
firmware: arm_scmi: Add SCMI PM driver remove routine
authorCristian Marussi <cristian.marussi@arm.com>
Wed, 17 Aug 2022 17:27:31 +0000 (18:27 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 23 Nov 2022 14:12:06 +0000 (15:12 +0100)
commit2692c00ac9223bd80ce5cecd65df741a5400bfde
tree083a0ad4fdd209e83cc01c6c317d3b6c60729dae
parent05e445b0483c76254af5c46c55af6de0a8f4cfce
firmware: arm_scmi: Add SCMI PM driver remove routine

BugLink: https://bugs.launchpad.net/bugs/1995637
[ Upstream commit dea796fcab0a219830831c070b8dc367d7e0f708 ]

Currently, when removing the SCMI PM driver not all the resources
registered with genpd subsystem are properly de-registered.

As a side effect of this after a driver unload/load cycle you get a
splat with a few warnings like this:

 | debugfs: Directory 'BIG_CPU0' with parent 'pm_genpd' already present!
 | debugfs: Directory 'BIG_CPU1' with parent 'pm_genpd' already present!
 | debugfs: Directory 'LITTLE_CPU0' with parent 'pm_genpd' already present!
 | debugfs: Directory 'LITTLE_CPU1' with parent 'pm_genpd' already present!
 | debugfs: Directory 'LITTLE_CPU2' with parent 'pm_genpd' already present!
 | debugfs: Directory 'LITTLE_CPU3' with parent 'pm_genpd' already present!
 | debugfs: Directory 'BIG_SSTOP' with parent 'pm_genpd' already present!
 | debugfs: Directory 'LITTLE_SSTOP' with parent 'pm_genpd' already present!
 | debugfs: Directory 'DBGSYS' with parent 'pm_genpd' already present!
 | debugfs: Directory 'GPUTOP' with parent 'pm_genpd' already present!

Add a proper scmi_pm_domain_remove callback to the driver in order to
take care of all the needed cleanups not handled by devres framework.

Link: https://lore.kernel.org/r/20220817172731.1185305-7-cristian.marussi@arm.com
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/firmware/arm_scmi/scmi_pm_domain.c