From: Shuah Khan <skhan@linuxfoundation.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: shuah <shuah@kernel.org>, Shuah Khan <skhan@linuxfoundation.org>,
Thomas Renninger <trenn@suse.com>,
Thomas Renninger <trenn@suse.de>,
"John B. Wyatt IV" <jwyatt@redhat.com>,
John Kacur <jkacur@redhat.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [GIT PULL] cpupower update for Linux 6.17-rc1
Date: Tue, 8 Jul 2025 13:40:28 -0600 [thread overview]
Message-ID: <ebbb6534-5968-4530-b9c8-0f6b21a96992@linuxfoundation.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1676 bytes --]
Hi Rafael,
Please pull the following cpupower update for Linux 6.17-rc1.
Fixes
- snapshot-order of tsc ,mperf, clock in mperf_stop()
- printing of CORE, CPU fields in cpupower-monitor
Improves Python binding's Makefile
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit e044b8a9545cd8265c7110c179aeec2624c16455:
cpupower: split unitdir from libdir in Makefile (2025-06-09 10:17:46 -0600)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux tags/linux-cpupower-6.17-rc1-fixed
for you to fetch changes up to b74710eaff314d6afe4fb0bbe9bc7657bf226fd4:
cpupower: Improve Python binding's Makefile (2025-07-01 10:58:00 -0600)
----------------------------------------------------------------
linux-cpupower-6.17-rc1-fixed
Fixes
- snapshot-order of tsc,mperf, clock in mperf_stop()
- printing of CORE, CPU fields in cpupower-monitor
Improves Python binding's Makefile
----------------------------------------------------------------
Gautham R. Shenoy (2):
pm: cpupower: Fix the snapshot-order of tsc,mperf, clock in mperf_stop()
pm: cpupower: Fix printing of CORE, CPU fields in cpupower-monitor
John B. Wyatt IV (1):
cpupower: Improve Python binding's Makefile
tools/power/cpupower/bindings/python/Makefile | 12 +++++++-----
tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c | 4 ----
tools/power/cpupower/utils/idle_monitor/mperf_monitor.c | 4 ++--
3 files changed, 9 insertions(+), 11 deletions(-)
----------------------------------------------------------------
[-- Attachment #2: linux-cpupower-6.17-rc1-fixed.diff --]
[-- Type: text/x-patch, Size: 2927 bytes --]
diff --git a/tools/power/cpupower/bindings/python/Makefile b/tools/power/cpupower/bindings/python/Makefile
index 81db39a03efb..4527cd732b42 100644
--- a/tools/power/cpupower/bindings/python/Makefile
+++ b/tools/power/cpupower/bindings/python/Makefile
@@ -4,20 +4,22 @@
# This Makefile expects you have already run `make install-lib` in the lib
# directory for the bindings to be created.
-CC := gcc
+CC ?= gcc
+# CFLAGS ?=
+LDFLAGS ?= -lcpupower
HAVE_SWIG := $(shell if which swig >/dev/null 2>&1; then echo 1; else echo 0; fi)
HAVE_PYCONFIG := $(shell if which python-config >/dev/null 2>&1; then echo 1; else echo 0; fi)
-PY_INCLUDE = $(firstword $(shell python-config --includes))
-INSTALL_DIR = $(shell python3 -c "import site; print(site.getsitepackages()[0])")
+PY_INCLUDE ?= $(firstword $(shell python-config --includes))
+INSTALL_DIR ?= $(shell python3 -c "import site; print(site.getsitepackages()[0])")
all: _raw_pylibcpupower.so
_raw_pylibcpupower.so: raw_pylibcpupower_wrap.o
- $(CC) -shared -lcpupower raw_pylibcpupower_wrap.o -o _raw_pylibcpupower.so
+ $(CC) -shared $(LDFLAGS) raw_pylibcpupower_wrap.o -o _raw_pylibcpupower.so
raw_pylibcpupower_wrap.o: raw_pylibcpupower_wrap.c
- $(CC) -fPIC -c raw_pylibcpupower_wrap.c $(PY_INCLUDE)
+ $(CC) $(CFLAGS) $(PY_INCLUDE) -fPIC -c raw_pylibcpupower_wrap.c
raw_pylibcpupower_wrap.c: raw_pylibcpupower.swg
ifeq ($(HAVE_SWIG),0)
diff --git a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
index ad493157f826..e8b3841d5c0f 100644
--- a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
+++ b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
@@ -121,10 +121,8 @@ void print_header(int topology_depth)
switch (topology_depth) {
case TOPOLOGY_DEPTH_PKG:
printf(" PKG|");
- break;
case TOPOLOGY_DEPTH_CORE:
printf("CORE|");
- break;
case TOPOLOGY_DEPTH_CPU:
printf(" CPU|");
break;
@@ -167,10 +165,8 @@ void print_results(int topology_depth, int cpu)
switch (topology_depth) {
case TOPOLOGY_DEPTH_PKG:
printf("%4d|", cpu_top.core_info[cpu].pkg);
- break;
case TOPOLOGY_DEPTH_CORE:
printf("%4d|", cpu_top.core_info[cpu].core);
- break;
case TOPOLOGY_DEPTH_CPU:
printf("%4d|", cpu_top.core_info[cpu].cpu);
break;
diff --git a/tools/power/cpupower/utils/idle_monitor/mperf_monitor.c b/tools/power/cpupower/utils/idle_monitor/mperf_monitor.c
index 73b6b10cbdd2..5ae02c3d5b64 100644
--- a/tools/power/cpupower/utils/idle_monitor/mperf_monitor.c
+++ b/tools/power/cpupower/utils/idle_monitor/mperf_monitor.c
@@ -240,9 +240,9 @@ static int mperf_stop(void)
int cpu;
for (cpu = 0; cpu < cpu_count; cpu++) {
- mperf_measure_stats(cpu);
- mperf_get_tsc(&tsc_at_measure_end[cpu]);
clock_gettime(CLOCK_REALTIME, &time_end[cpu]);
+ mperf_get_tsc(&tsc_at_measure_end[cpu]);
+ mperf_measure_stats(cpu);
}
return 0;
next reply other threads:[~2025-07-08 19:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-08 19:40 Shuah Khan [this message]
2025-07-09 13:13 ` [GIT PULL] cpupower update for Linux 6.17-rc1 Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ebbb6534-5968-4530-b9c8-0f6b21a96992@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=jkacur@redhat.com \
--cc=jwyatt@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=shuah@kernel.org \
--cc=trenn@suse.com \
--cc=trenn@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox