[PATCH 0/2] Save cpuhp dynamic state

Pierre Gondois posted 2 patches 3 years, 6 months ago
drivers/powercap/dtpm_cpu.c             |  7 ++++++-
drivers/soc/xilinx/xlnx_event_manager.c | 12 ++++++++++--
2 files changed, 16 insertions(+), 3 deletions(-)
[PATCH 0/2] Save cpuhp dynamic state
Posted by Pierre Gondois 3 years, 6 months ago
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
Re: [PATCH 0/2] Save cpuhp dynamic state
Posted by Pierre Gondois 3 years, 5 months ago
Hello,
Just a ping in case this was forgotten,

Regards,
Pierre

On 9/14/22 18:28, Pierre Gondois wrote:
> 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(-)
>
Re: [PATCH 0/2] Save cpuhp dynamic state
Posted by Pierre Gondois 3 years, 2 months ago
Hello Daniel, Abhyuday,
Another ping just in case,

Regards,
Pierre

On 10/6/22 09:54, Pierre Gondois wrote:
> Hello,
> Just a ping in case this was forgotten,
> 
> Regards,
> Pierre
> 
> On 9/14/22 18:28, Pierre Gondois wrote:
>> 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(-)
>>