[Armadeus-commitlog] armadeus branch, master, updated. armadeus-7.0-246-gb61898a9e
Brought to you by:
sszy
|
From: Sébastien S. <ss...@us...> - 2021-04-13 09:14:55
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via b61898a9e9028e5f65f4338bbf9bf325ad069051 (commit)
from fa2292741a9732c1b82b0e0dc9a2404d49025eac (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b61898a9e9028e5f65f4338bbf9bf325ad069051
Author: Sébastien Szymanski <seb...@ar...>
Date: Mon Apr 12 15:21:18 2021 +0200
[PATCH] 5.4.imx_legacy: patch to fix cpupower with gcc 10
-----------------------------------------------------------------------
Summary of changes:
...oid-multiple-definition-with-gcc-fno-comm.patch | 85 ++++++++++++++++++++++
1 file changed, 85 insertions(+)
create mode 100644 patches/linux/5.4.imx_legacy/0546-cpupower-avoid-multiple-definition-with-gcc-fno-comm.patch
diff --git a/patches/linux/5.4.imx_legacy/0546-cpupower-avoid-multiple-definition-with-gcc-fno-comm.patch b/patches/linux/5.4.imx_legacy/0546-cpupower-avoid-multiple-definition-with-gcc-fno-comm.patch
new file mode 100644
index 000000000..5589c9813
--- /dev/null
+++ b/patches/linux/5.4.imx_legacy/0546-cpupower-avoid-multiple-definition-with-gcc-fno-comm.patch
@@ -0,0 +1,85 @@
+From 2de7fb60a4740135e03cf55c1982e393ccb87b6b Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <fl...@ge...>
+Date: Wed, 26 Feb 2020 14:33:59 -0500
+Subject: [PATCH 1/1] cpupower: avoid multiple definition with gcc -fno-common
+
+Building cpupower with -fno-common in CFLAGS results in errors due to
+multiple definitions of the 'cpu_count' and 'start_time' variables.
+
+./utils/idle_monitor/snb_idle.o:./utils/idle_monitor/cpupower-monitor.h:28:
+multiple definition of `cpu_count';
+./utils/idle_monitor/nhm_idle.o:./utils/idle_monitor/cpupower-monitor.h:28:
+first defined here
+...
+./utils/idle_monitor/cpuidle_sysfs.o:./utils/idle_monitor/cpuidle_sysfs.c:22:
+multiple definition of `start_time';
+./utils/idle_monitor/amd_fam14h_idle.o:./utils/idle_monitor/amd_fam14h_idle.c:85:
+first defined here
+
+The -fno-common option will be enabled by default in GCC 10.
+
+Bug: https://bugs.gentoo.org/707462
+Signed-off-by: Mike Gilbert <fl...@ge...>
+Signed-off-by: Shuah Khan <sk...@li...>
+---
+ tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c | 2 +-
+ tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c | 2 +-
+ tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c | 2 ++
+ tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h | 2 +-
+ 4 files changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c b/tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c
+index 33dc34db4f3c..20f46348271b 100644
+--- a/tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c
++++ b/tools/power/cpupower/utils/idle_monitor/amd_fam14h_idle.c
+@@ -82,7 +82,7 @@ static struct pci_access *pci_acc;
+ static struct pci_dev *amd_fam14h_pci_dev;
+ static int nbp1_entered;
+
+-struct timespec start_time;
++static struct timespec start_time;
+ static unsigned long long timediff;
+
+ #ifdef DEBUG
+diff --git a/tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c b/tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c
+index 3c4cee160b0e..a65f7d011513 100644
+--- a/tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c
++++ b/tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c
+@@ -19,7 +19,7 @@ struct cpuidle_monitor cpuidle_sysfs_monitor;
+
+ static unsigned long long **previous_count;
+ static unsigned long long **current_count;
+-struct timespec start_time;
++static struct timespec start_time;
+ static unsigned long long timediff;
+
+ static int cpuidle_get_count_percent(unsigned int id, double *percent,
+diff --git a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
+index 6d44fec55ad5..7c77045fef52 100644
+--- a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
++++ b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.c
+@@ -27,6 +27,8 @@ struct cpuidle_monitor *all_monitors[] = {
+ 0
+ };
+
++int cpu_count;
++
+ static struct cpuidle_monitor *monitors[MONITORS_MAX];
+ static unsigned int avail_monitors;
+
+diff --git a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h
+index 5b5eb1da0cce..c559d3115330 100644
+--- a/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h
++++ b/tools/power/cpupower/utils/idle_monitor/cpupower-monitor.h
+@@ -25,7 +25,7 @@
+ #endif
+ #define CSTATE_DESC_LEN 60
+
+-int cpu_count;
++extern int cpu_count;
+
+ /* Hard to define the right names ...: */
+ enum power_range_e {
+--
+2.26.3
+
hooks/post-receive
--
armadeus
|