Update to release 0.0.6
- Update to release 0.0.6 - A patch fixed the compiler "above array bound" error Resolves: RHEL-45136
This commit is contained in:
parent
bca907eb83
commit
8219937eae
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
/intel-lpmd-0.0.2.tar.gz
|
||||
/intel-lpmd-0.0.3.tar.gz
|
||||
/intel-lpmd-0.0.6.tar.gz
|
||||
|
||||
51
0001-lpmd_cpu-Fix-compiler-above-array-bound-error.patch
Normal file
51
0001-lpmd_cpu-Fix-compiler-above-array-bound-error.patch
Normal file
@ -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
|
||||
|
||||
32
22.patch
32
22.patch
@ -1,32 +0,0 @@
|
||||
From 3717c7186895951f58b429d67b954e23a1986b05 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ali=20Erdin=C3=A7=20K=C3=B6ro=C4=9Flu?=
|
||||
<ali.erdinc.koroglu@intel.com>
|
||||
Date: Fri, 9 Feb 2024 17:17:09 +0200
|
||||
Subject: [PATCH] Update lpmd_cpu.c
|
||||
|
||||
Werror unused-variable fixes
|
||||
---
|
||||
src/lpmd_cpu.c | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/lpmd_cpu.c b/src/lpmd_cpu.c
|
||||
index f4dec42..bddd3a7 100644
|
||||
--- a/src/lpmd_cpu.c
|
||||
+++ b/src/lpmd_cpu.c
|
||||
@@ -804,7 +804,7 @@ static int detect_lpm_cpus_cmd(char *cmd)
|
||||
*/
|
||||
static int is_cpu_atom(int cpu)
|
||||
{
|
||||
- unsigned int eax, ebx, ecx, edx, subleaf;
|
||||
+ unsigned int eax, ebx, ecx, edx;
|
||||
unsigned int type;
|
||||
|
||||
if (cpu_migrate(cpu) < 0) {
|
||||
@@ -906,7 +906,6 @@ static int detect_cpu_l3(int cpu)
|
||||
*/
|
||||
static int detect_lpm_cpus_l3(void)
|
||||
{
|
||||
- char path[MAX_STR_LENGTH];
|
||||
int i;
|
||||
|
||||
for (i = 0; i < topo_max_cpus; i++) {
|
||||
@ -1,24 +1,24 @@
|
||||
%global daemon_name intel_lpmd
|
||||
|
||||
Name: intel-lpmd
|
||||
Version: 0.0.3
|
||||
Release: 2%{?dist}
|
||||
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
|
||||
|
||||
# https://patch-diff.githubusercontent.com/raw/intel/intel-lpmd/pull/22.patch
|
||||
Patch0: 22.patch
|
||||
# Fix "above array bound" compiler error
|
||||
Patch0: 0001-lpmd_cpu-Fix-compiler-above-array-bound-error.patch
|
||||
|
||||
ExclusiveArch: x86_64
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: gcc
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: gtk-doc
|
||||
BuildRequires: dbus-glib-devel
|
||||
BuildRequires: libnl3-devel
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: libtool
|
||||
@ -74,6 +74,9 @@ install -D -p -m 644 src/%{daemon_name}_dbus_interface.xml %{buildroot}/%{_datad
|
||||
%{_mandir}/man8/%{daemon_name}.8*
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (intel-lpmd-0.0.3.tar.gz) = 1de0ec7ef316d3b8052e487578acb2f70f9d65af866a48ff6fff10528882f619b0700fb986f44f8b6504a0f0a17a40a7e963085d85bc4723ef81e93454e65bfa
|
||||
SHA512 (intel-lpmd-0.0.6.tar.gz) = b29e4525aa76b169f4d246903f8b3d500d936e14085ba12ce3f31a0c6dfb80bebdd9adfd92ef5db9a5d2ee772c7fe8d6c9662f19de6346ef5354a082b4cb63dc
|
||||
|
||||
Loading…
Reference in New Issue
Block a user