diff mbox series

pm: cpupower: Add missing residency header changes in cpuidle.h to SWIG

Message ID 20250108221852.30771-1-jwyatt@redhat.com (mailing list archive)
State Accepted
Delegated to: Shuah Khan
Headers show
Series pm: cpupower: Add missing residency header changes in cpuidle.h to SWIG | expand

Commit Message

John B. Wyatt IV Jan. 8, 2025, 10:18 p.m. UTC
"tools/cpupower: display residency value in idle-info" added a new
function to cpuidle.h. This patch adds them to the bindings.

Link: https://lore.kernel.org/linux-pm/20240809083728.266697-1-aboorvad@linux.ibm.com/

Tested by compiling both libcpupower and the headers; running the test
script that does not use the functions as a basic sanity test.

Signed-off-by: "John B. Wyatt IV" <jwyatt@redhat.com>
Signed-off-by: "John B. Wyatt IV" <sageofredondo@gmail.com>
---
 tools/power/cpupower/bindings/python/raw_pylibcpupower.swg | 2 ++
 1 file changed, 2 insertions(+)

Comments

John B. Wyatt IV Jan. 13, 2025, 2:04 p.m. UTC | #1
Hello Shuah,

Did you have a chance to look at this? This is the second header change
that was missing from the bindings.

On Wed, Jan 08, 2025 at 05:18:44PM -0500, John B. Wyatt IV wrote:
> "tools/cpupower: display residency value in idle-info" added a new
> function to cpuidle.h. This patch adds them to the bindings.
> 
> Link: https://lore.kernel.org/linux-pm/20240809083728.266697-1-aboorvad@linux.ibm.com/
> 
> Tested by compiling both libcpupower and the headers; running the test
> script that does not use the functions as a basic sanity test.
> 
> Signed-off-by: "John B. Wyatt IV" <jwyatt@redhat.com>
> Signed-off-by: "John B. Wyatt IV" <sageofredondo@gmail.com>
> ---
>  tools/power/cpupower/bindings/python/raw_pylibcpupower.swg | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/power/cpupower/bindings/python/raw_pylibcpupower.swg b/tools/power/cpupower/bindings/python/raw_pylibcpupower.swg
> index a8226c79cfea..d82af6fa93c3 100644
> --- a/tools/power/cpupower/bindings/python/raw_pylibcpupower.swg
> +++ b/tools/power/cpupower/bindings/python/raw_pylibcpupower.swg
> @@ -163,6 +163,8 @@ int cpuidle_state_disable(unsigned int cpu, unsigned int idlestate,
>  				   unsigned int disable);
>  unsigned long cpuidle_state_latency(unsigned int cpu,
>  						unsigned int idlestate);
> +unsigned long cpuidle_state_residency(unsigned int cpu,
> +						unsigned int idlestate);
>  unsigned long cpuidle_state_usage(unsigned int cpu,
>  					unsigned int idlestate);
>  unsigned long long cpuidle_state_time(unsigned int cpu,
> -- 
> 2.47.1
>
Shuah Khan Jan. 13, 2025, 4:36 p.m. UTC | #2
On 1/13/25 07:04, John B. Wyatt IV wrote:
> Hello Shuah,
> 
> Did you have a chance to look at this? This is the second header change
> that was missing from the bindings.
> 
> On Wed, Jan 08, 2025 at 05:18:44PM -0500, John B. Wyatt IV wrote:
>> "tools/cpupower: display residency value in idle-info" added a new
>> function to cpuidle.h. This patch adds them to the bindings.
>>
>> Link: https://lore.kernel.org/linux-pm/20240809083728.266697-1-aboorvad@linux.ibm.com/
>>
>> Tested by compiling both libcpupower and the headers; running the test
>> script that does not use the functions as a basic sanity test.
>>
>> Signed-off-by: "John B. Wyatt IV" <jwyatt@redhat.com>
>> Signed-off-by: "John B. Wyatt IV" <sageofredondo@gmail.com>
>> ---

Yes I did. Looks good to me. I am waiting for Rafael to pull my PR
to apply the patch.

thanks,
-- Shuah
Shuah Khan Jan. 13, 2025, 11:17 p.m. UTC | #3
On 1/13/25 09:36, Shuah Khan wrote:
> On 1/13/25 07:04, John B. Wyatt IV wrote:
>> Hello Shuah,
>>
>> Did you have a chance to look at this? This is the second header change
>> that was missing from the bindings.
>>
>> On Wed, Jan 08, 2025 at 05:18:44PM -0500, John B. Wyatt IV wrote:
>>> "tools/cpupower: display residency value in idle-info" added a new
>>> function to cpuidle.h. This patch adds them to the bindings.
>>>
>>> Link: https://lore.kernel.org/linux-pm/20240809083728.266697-1-aboorvad@linux.ibm.com/
>>>
>>> Tested by compiling both libcpupower and the headers; running the test
>>> script that does not use the functions as a basic sanity test.
>>>
>>> Signed-off-by: "John B. Wyatt IV" <jwyatt@redhat.com>
>>> Signed-off-by: "John B. Wyatt IV" <sageofredondo@gmail.com>
>>> ---
> 
> Yes I did. Looks good to me. I am waiting for Rafael to pull my PR
> to apply the patch.
> 
> thanks,
> -- Shuah

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git/log/?h=cpupower

Will send another pr to Rafael later this week.

thanks,
-- Shuah
John B. Wyatt IV Jan. 14, 2025, 8:39 p.m. UTC | #4
On Mon, Jan 13, 2025 at 04:17:32PM -0700, Shuah Khan wrote:
> On 1/13/25 09:36, Shuah Khan wrote:
> 
> Applied to https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git/log/?h=cpupower
> 
> Will send another pr to Rafael later this week.
> 
> thanks,
> -- Shuah
> 

Thank you; I appreciate it.
diff mbox series

Patch

diff --git a/tools/power/cpupower/bindings/python/raw_pylibcpupower.swg b/tools/power/cpupower/bindings/python/raw_pylibcpupower.swg
index a8226c79cfea..d82af6fa93c3 100644
--- a/tools/power/cpupower/bindings/python/raw_pylibcpupower.swg
+++ b/tools/power/cpupower/bindings/python/raw_pylibcpupower.swg
@@ -163,6 +163,8 @@  int cpuidle_state_disable(unsigned int cpu, unsigned int idlestate,
 				   unsigned int disable);
 unsigned long cpuidle_state_latency(unsigned int cpu,
 						unsigned int idlestate);
+unsigned long cpuidle_state_residency(unsigned int cpu,
+						unsigned int idlestate);
 unsigned long cpuidle_state_usage(unsigned int cpu,
 					unsigned int idlestate);
 unsigned long long cpuidle_state_time(unsigned int cpu,