Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
8ec584ccf0 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
/intel-lpmd-*.tar.gz
|
||||
SOURCES/intel-lpmd-0.0.6.tar.gz
|
||||
|
1
.intel-lpmd.metadata
Normal file
1
.intel-lpmd.metadata
Normal file
@ -0,0 +1 @@
|
||||
7582cf7147290d98c4b48740725381a26a51c540 SOURCES/intel-lpmd-0.0.6.tar.gz
|
@ -1,37 +0,0 @@
|
||||
From c2cea33c873146f1b6186c02fe79d1a2bb1c7867 Mon Sep 17 00:00:00 2001
|
||||
From: Kate Hsuan <hpa@redhat.com>
|
||||
Date: Fri, 2 May 2025 16:49:00 +0800
|
||||
Subject: [PATCH 1/4] lpmd_util: Remove unused variables
|
||||
|
||||
Remove unused variables.
|
||||
---
|
||||
src/lpmd_util.c | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/src/lpmd_util.c b/src/lpmd_util.c
|
||||
index cd3123a..55f7874 100644
|
||||
--- a/src/lpmd_util.c
|
||||
+++ b/src/lpmd_util.c
|
||||
@@ -83,7 +83,6 @@ static int probe_gfx_util_sysfs(void)
|
||||
{
|
||||
FILE *fp;
|
||||
char buf[8];
|
||||
- bool gt0_is_gt;
|
||||
|
||||
if (access("/sys/class/drm/card0/device/tile0/gt0/gtidle/idle_residency_ms", R_OK))
|
||||
return 1;
|
||||
@@ -119,11 +118,9 @@ static int get_gfx_util_sysfs(unsigned long long time_ms)
|
||||
{
|
||||
static unsigned long long gfx_rc6_prev = ULLONG_MAX, sam_mc6_prev = ULLONG_MAX;
|
||||
unsigned long long gfx_rc6, sam_mc6;
|
||||
- unsigned long long val;
|
||||
FILE *fp;
|
||||
int gfx_util, sam_util;
|
||||
int ret;
|
||||
- int i;
|
||||
|
||||
gfx_util = sam_util = -1;
|
||||
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 311b7929d4c821630fabf5293ec5b4bec5411162 Mon Sep 17 00:00:00 2001
|
||||
From: Kate Hsuan <hpa@redhat.com>
|
||||
Date: Fri, 2 May 2025 16:49:42 +0800
|
||||
Subject: [PATCH 2/4] wlt_proxy: state_manager: Fix -Werror=switch
|
||||
|
||||
Fix the swicth expression to avoid -Werror=switch warnning.
|
||||
---
|
||||
src/wlt_proxy/state_manager.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/wlt_proxy/state_manager.c b/src/wlt_proxy/state_manager.c
|
||||
index 7841135..9753442 100644
|
||||
--- a/src/wlt_proxy/state_manager.c
|
||||
+++ b/src/wlt_proxy/state_manager.c
|
||||
@@ -285,6 +285,8 @@ int staytime_to_staycount(enum state_idx state)
|
||||
case PERF_MODE:
|
||||
stay_count = (int)PERF_MODE_STAY/get_poll_ms(PERF_MODE);
|
||||
break;
|
||||
+ default:
|
||||
+ break;
|
||||
}
|
||||
return stay_count;
|
||||
}
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,29 +0,0 @@
|
||||
From 4277f3496dc51f89ed0815e0f51659338f7a6ba9 Mon Sep 17 00:00:00 2001
|
||||
From: Kate Hsuan <hpa@redhat.com>
|
||||
Date: Fri, 2 May 2025 16:52:16 +0800
|
||||
Subject: [PATCH 3/4] wlt_proxy: state_util: Remove unused variables
|
||||
|
||||
Remove unused variables.
|
||||
---
|
||||
src/wlt_proxy/state_util.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/wlt_proxy/state_util.c b/src/wlt_proxy/state_util.c
|
||||
index 95422c8..9d633d5 100644
|
||||
--- a/src/wlt_proxy/state_util.c
|
||||
+++ b/src/wlt_proxy/state_util.c
|
||||
@@ -381,10 +381,9 @@ static int read_aperf_mperf_tsc_perf(struct thread_data *t, int cpu) {
|
||||
/*Calc perf [cpu utilization per core] difference from MSR registers */
|
||||
int update_perf_diffs(float *sum_norm_perf, int stat_init_only) {
|
||||
|
||||
- int fd, maxed_cpu = -1;
|
||||
+ int maxed_cpu = -1;
|
||||
float min_load = 100.0, min_s0 = 1.0, next_s0 = 1.0;
|
||||
float max_load = 0, max_2nd_load = 0, max_3rd_load = 0, next_load = 0;
|
||||
- uint64_t aperf_raw, mperf_raw, pperf_raw, tsc_raw, poll_cpu_us = 0;
|
||||
int t, min_s0_cpu = 0, first_pass = 1;
|
||||
|
||||
for (t = 0; t < get_max_online_cpu(); t++) {
|
||||
--
|
||||
2.49.0
|
||||
|
@ -1,33 +0,0 @@
|
||||
From af6d8f93a0a1041bd936b8901707e1253c5e5279 Mon Sep 17 00:00:00 2001
|
||||
From: Kate Hsuan <hpa@redhat.com>
|
||||
Date: Fri, 2 May 2025 17:07:21 +0800
|
||||
Subject: [PATCH 4/4] wlt_proxy: state_util: Drop unused function
|
||||
read_tsc_config()
|
||||
|
||||
Drop the unused function read_tsc_config().
|
||||
---
|
||||
src/wlt_proxy/state_util.c | 8 --------
|
||||
1 file changed, 8 deletions(-)
|
||||
|
||||
diff --git a/src/wlt_proxy/state_util.c b/src/wlt_proxy/state_util.c
|
||||
index 9d633d5..f35242e 100644
|
||||
--- a/src/wlt_proxy/state_util.c
|
||||
+++ b/src/wlt_proxy/state_util.c
|
||||
@@ -268,14 +268,6 @@ static unsigned int read_mperf_config(void) {
|
||||
return read_perf_counter_info_n(path, format);
|
||||
}
|
||||
|
||||
-/*helper - pperf reading */
|
||||
-static unsigned int read_tsc_config(void) {
|
||||
- const char *const path = "/sys/bus/event_source/devices/msr/events/tsc";
|
||||
- const char *const format = "event=%x";
|
||||
-
|
||||
- return read_perf_counter_info_n(path, format);
|
||||
-}
|
||||
-
|
||||
/*helper - pperf reading */
|
||||
static unsigned int read_msr_type(void) {
|
||||
const char *const path = "/sys/bus/event_source/devices/msr/type";
|
||||
--
|
||||
2.49.0
|
||||
|
@ -0,0 +1,51 @@
|
||||
From 1918cd77f5f26eeb4f9288ed45072068e1b4da34 Mon Sep 17 00:00:00 2001
|
||||
From: Kate Hsuan <hpa@redhat.com>
|
||||
Date: Tue, 16 Jul 2024 11:31:00 +0800
|
||||
Subject: [PATCH] lpmd_cpu: Fix compiler above array bound error
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
n file included from /usr/include/glib-2.0/glib.h:64,
|
||||
from src/lpmd.h:48,
|
||||
from src/lpmd_cpu.c:52:
|
||||
src/lpmd_cpu.c: In function ‘add_cpu’:
|
||||
src/lpmd_cpu.c:408:66: error: array subscript 8 is above array bounds of ‘struct lpm_cpus[7]’ [-Werror=array-bounds=]
|
||||
408 | lpmd_log_debug ("\tDetected %s CPU%d\n", cpumasks[idx].name, cpu);
|
||||
| ~~~~~~~~^~~~~
|
||||
src/lpmd_cpu.c:67:24: note: while referencing ‘cpumasks’
|
||||
67 | static struct lpm_cpus cpumasks[CPUMASK_MAX] = {
|
||||
| ^~~~~~~~
|
||||
cc1: all warnings being treated as errors
|
||||
make[2]: *** [Makefile:686: src/intel_lpmd-lpmd_cpu.o] Error 1
|
||||
make[1]: *** [Makefile:868: all-recursive] Error 1
|
||||
make: *** [Makefile:459: all] Error 2
|
||||
---
|
||||
src/lpmd_cpu.c | 10 +++++++---
|
||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/lpmd_cpu.c b/src/lpmd_cpu.c
|
||||
index 310bf65..808ae4b 100644
|
||||
--- a/src/lpmd_cpu.c
|
||||
+++ b/src/lpmd_cpu.c
|
||||
@@ -402,10 +402,14 @@ int add_cpu(int cpu, enum cpumask_idx idx)
|
||||
if (idx & (CPUMASK_HFI | CPUMASK_HFI_SUV | CPUMASK_HFI_BANNED))
|
||||
return 0;
|
||||
|
||||
- if (idx == CPUMASK_LPM_DEFAULT)
|
||||
+ if (idx == CPUMASK_LPM_DEFAULT) {
|
||||
lpmd_log_info ("\tDetected %s CPU%d\n", cpumasks[idx].name, cpu);
|
||||
- else
|
||||
- lpmd_log_debug ("\tDetected %s CPU%d\n", cpumasks[idx].name, cpu);
|
||||
+ } else {
|
||||
+ if (idx < CPUMASK_MAX)
|
||||
+ lpmd_log_debug ("\tDetected %s CPU%d\n", cpumasks[idx].name, cpu);
|
||||
+ else
|
||||
+ lpmd_log_debug ("\tIncorrect CPU ID for CPU%d\n", cpu);
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.45.2
|
||||
|
@ -1,23 +1,16 @@
|
||||
%global daemon_name intel_lpmd
|
||||
|
||||
Name: intel-lpmd
|
||||
Version: 0.0.9
|
||||
Release: %autorelease
|
||||
Version: 0.0.6
|
||||
Release: 1%{?dist}
|
||||
Summary: Intel Low Power Mode Daemon
|
||||
|
||||
License: GPL-2.0-or-later
|
||||
URL: https://github.com/intel/intel-lpmd
|
||||
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
# Drop unused variables https://github.com/intel/intel-lpmd/pull/93
|
||||
# https://github.com/intel/intel-lpmd/commit/c2cea33c873146f1b6186c02fe79d1a2bb1c7867.patch
|
||||
Patch1001: 0001-lpmd_util-Remove-unused-variables.patch
|
||||
# https://github.com/intel/intel-lpmd/commit/311b7929d4c821630fabf5293ec5b4bec5411162.patch
|
||||
Patch1002: 0002-wlt_proxy-state_manager-Fix-Werror-switch.patch
|
||||
# https://github.com/intel/intel-lpmd/commit/4277f3496dc51f89ed0815e0f51659338f7a6ba9.patch
|
||||
Patch1003: 0003-wlt_proxy-state_util-Remove-unused-variables.patch
|
||||
# https://github.com/intel/intel-lpmd/commit/af6d8f93a0a1041bd936b8901707e1253c5e5279.patch
|
||||
Patch1004: 0004-wlt_proxy-state_util-Drop-unused-function-read_tsc_c.patch
|
||||
# Fix "above array bound" compiler error
|
||||
Patch0: 0001-lpmd_cpu-Fix-compiler-above-array-bound-error.patch
|
||||
|
||||
ExclusiveArch: x86_64
|
||||
|
||||
@ -31,7 +24,6 @@ BuildRequires: libxml2-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: systemd-devel
|
||||
BuildRequires: systemd-units
|
||||
BuildRequires: upower-devel
|
||||
|
||||
%description
|
||||
Intel Low Power Model Daemon is a Linux daemon used to optimize active idle
|
||||
@ -74,15 +66,24 @@ install -D -p -m 644 src/%{daemon_name}_dbus_interface.xml %{buildroot}/%{_datad
|
||||
%{_sbindir}/%{daemon_name}
|
||||
%dir %{_sysconfdir}/%{daemon_name}
|
||||
%config(noreplace) %{_sysconfdir}/%{daemon_name}/%{daemon_name}_config.xml
|
||||
%config(noreplace) %{_sysconfdir}/%{daemon_name}/intel_lpmd_config_F6_M170.xml
|
||||
%config(noreplace) %{_sysconfdir}/%{daemon_name}/intel_lpmd_config_F6_M189.xml
|
||||
%{_datadir}/dbus-1/interfaces/org.freedesktop.%{daemon_name}.xml
|
||||
%{_datadir}/dbus-1/system.d/org.freedesktop.%{daemon_name}.conf
|
||||
%{_datadir}/dbus-1/system-services/org.freedesktop.%{daemon_name}.service
|
||||
%{_unitdir}/%{daemon_name}.service
|
||||
%{_mandir}/man5/%{daemon_name}_config.xml.5*
|
||||
%{_mandir}/man8/%{daemon_name}.8*
|
||||
%{_mandir}/man8/%{daemon_name}_control.8*
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
* Tue Jul 16 2024 Kate Hsuan <hpa@redhat.com> - 0.0.6-1
|
||||
- Update to upstream release 0.0.6
|
||||
|
||||
* Wed May 29 2024 Kate Hsuan <hpa@redhat.com> - 0.0.3-2
|
||||
- Rebuild for RHEL-9.5
|
||||
- Resolves: RHEL-20167
|
||||
|
||||
* Mon Feb 26 2024 Kate Hsuan <hpa@redhat.com> - 0.0.3-1
|
||||
- Update to 0.0.3
|
||||
- Use cpuid() to detect Lcores
|
||||
|
||||
* Fri Feb 2 2024 Kate Hsuan <hpa@redhat.com> - 0.0.2-1
|
||||
- Initial upstream release
|
@ -1,6 +0,0 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-10
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional}
|
Loading…
Reference in New Issue
Block a user