linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Save cpuhp dynamic state
@ 2022-09-14 16:28 Pierre Gondois
  2022-09-14 16:28 ` [PATCH 1/2] driver: soc: xilinx: " Pierre Gondois
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Pierre Gondois @ 2022-09-14 16:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: Pierre Gondois, Daniel Lezcano, Rafael J. Wysocki,
	Abhyuday Godhasara, Michal Simek, linux-pm, linux-arm-kernel

Requesting a CPUHP_AP_ONLINE_DYN cpuhp state reserves a state
among the range [CPUHP_AP_ONLINE_DYN:CPUHP_AP_ONLINE_DYN_END].
The reserved state must be saved in order to remove it later.

Cf. __cpuhp_setup_state_cpuslocked() documentation:
Return:
  On success:
    Positive state number if @state is CPUHP_AP_ONLINE_DYN;
    0 for all other states

Indeed, the following:
  cpuhp_remove_state(CPUHP_AP_ONLINE_DYN);
removes the first dynamic states added to the cpuhp state machine.

Patches were tested as:
- powercap/drivers/dtpm: on a Juno-r2, using a late_initcall()
  to init and exit the dtpm framework.
- driver: soc: xilinx: the patch was only compile tested
  due to missing hardware.

Pierre Gondois (2):
  driver: soc: xilinx: Save cpuhp dynamic state
  powercap/drivers/dtpm: Save cpuhp dynamic state

 drivers/powercap/dtpm_cpu.c             |  7 ++++++-
 drivers/soc/xilinx/xlnx_event_manager.c | 12 ++++++++++--
 2 files changed, 16 insertions(+), 3 deletions(-)

-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-01 16:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-14 16:28 [PATCH 0/2] Save cpuhp dynamic state Pierre Gondois
2022-09-14 16:28 ` [PATCH 1/2] driver: soc: xilinx: " Pierre Gondois
2022-09-14 16:28 ` [PATCH 2/2] powercap/drivers/dtpm: " Pierre Gondois
2022-10-06  7:54 ` [PATCH 0/2] " Pierre Gondois
2023-02-01 16:20   ` Pierre Gondois

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).