From c59d9c593c92e3495d53ef2218c9579016ef7fdd771f56275df18c2d922e4448 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Thu, 30 Jan 2020 13:56:12 +0000 Subject: [PATCH] Accepting request 768744 from home:trenn:branches:hardware - Add mainline patch with proper patch header and filename: D libcpupower_fix_api_cpufreq_get_frequencies_breakage.patch A cpupower-Revert-library-ABI-changes-from-commit-ae2917093fb60bdc1ed3e.patch - Fix manpage (bsc#1162142) A Correction-to-manpage-of-cpupower.patch OBS-URL: https://build.opensuse.org/request/show/768744 OBS-URL: https://build.opensuse.org/package/show/hardware/cpupower?expand=0&rev=104 --- Correction-to-manpage-of-cpupower.patch | 34 ++++++++++++ ...es-from-commit-ae2917093fb60bdc1ed3e.patch | 55 ++++++++++++------- cpupower.changes | 9 +++ cpupower.spec | 6 +- 4 files changed, 81 insertions(+), 23 deletions(-) create mode 100644 Correction-to-manpage-of-cpupower.patch rename libcpupower_fix_api_cpufreq_get_frequencies_breakage.patch => cpupower-Revert-library-ABI-changes-from-commit-ae2917093fb60bdc1ed3e.patch (82%) diff --git a/Correction-to-manpage-of-cpupower.patch b/Correction-to-manpage-of-cpupower.patch new file mode 100644 index 0000000..5260534 --- /dev/null +++ b/Correction-to-manpage-of-cpupower.patch @@ -0,0 +1,34 @@ +From: Brahadambal Srinivasan +Subject: Correction to manpage of cpupower +References: bsc#1162142 +Patch-Mainline: +Git-commit: 8c30fa7666ff08dad632411d1a9b9883940e53ef +Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git + +Manpage of cpupower is listing wrong sub-commands in "See Also" +section. The option for cpupower-idle(1) should actually be +cpupower-idle-info(1) and cpupower-idle-set(1). This patch corrects +this anomaly. + +Signed-off-by: Brahadambal Srinivasan +Signed-off-by: Shuah Khan + + +Signed-off-by: +diff --git a/man/cpupower.1 b/man/cpupower.1 +index baf741d06e82..a5e4523a219b 100644 +--- a/man/cpupower.1 ++++ b/man/cpupower.1 +@@ -62,9 +62,9 @@ all cores + Print the package name and version number. + + .SH "SEE ALSO" +-cpupower-set(1), cpupower-info(1), cpupower-idle(1), +-cpupower-frequency-set(1), cpupower-frequency-info(1), cpupower-monitor(1), +-powertop(1) ++cpupower-set(1), cpupower-info(1), cpupower-idle-info(1), ++cpupower-idle-set(1), cpupower-frequency-set(1), cpupower-frequency-info(1), ++cpupower-monitor(1), powertop(1) + .PP + .SH AUTHORS + .nf diff --git a/libcpupower_fix_api_cpufreq_get_frequencies_breakage.patch b/cpupower-Revert-library-ABI-changes-from-commit-ae2917093fb60bdc1ed3e.patch similarity index 82% rename from libcpupower_fix_api_cpufreq_get_frequencies_breakage.patch rename to cpupower-Revert-library-ABI-changes-from-commit-ae2917093fb60bdc1ed3e.patch index bd02042..bb08bf3 100644 --- a/libcpupower_fix_api_cpufreq_get_frequencies_breakage.patch +++ b/cpupower-Revert-library-ABI-changes-from-commit-ae2917093fb60bdc1ed3e.patch @@ -1,24 +1,37 @@ -commit 23ce8fc7ebcf63b986027d7fcd792fd521c43800 -Author: Thomas Renninger -Date: Mon Dec 2 11:50:39 2019 +0100 +From: Thomas Renninger +Subject: cpupower: Revert library ABI changes from commit ae2917093fb60bdc1ed3e +References: bsc#1162142 +Patch-Mainline: +Git-commit: 41ddb7e1f79693d904502ae9bea609837973eff8 +Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git - Revert library ABI changes from commit ae2917093fb60bdc1ed3e - - Commit ae2917093fb60bdc1ed3e modified the library function: - - struct cpufreq_available_frequencies - *cpufreq_get_available_frequencies(unsigned int cpu) - - to - struct cpufreq_frequencies - *cpufreq_get_frequencies(const char *type, unsigned int cpu) - - This patch recovers the old API and implements the new functionality - in a newly introduce method: - struct cpufreq_boost_frequencies - *cpufreq_get_available_frequencies(unsigned int cpu) +Commit ae2917093fb6 ("tools/power/cpupower: Display boost frequency +separately") modified the library function: -diff --git a/tools/power/cpupower/lib/cpufreq.c b/tools/power/cpupower/lib/cpufreq.c +struct cpufreq_available_frequencies +*cpufreq_get_available_frequencies(unsigned int cpu) + +to +struct cpufreq_frequencies +*cpufreq_get_frequencies(const char *type, unsigned int cpu) + +This patch recovers the old API and implements the new functionality +in a newly introduce method: +struct cpufreq_boost_frequencies +*cpufreq_get_available_frequencies(unsigned int cpu) + +This one should get merged into stable kernels back to 5.0 when +the above had been introduced. + +Fixes: ae2917093fb6 ("tools/power/cpupower: Display boost frequency separately") + +Cc: stable@vger.kernel.org +Signed-off-by: Thomas Renninger +Signed-off-by: Shuah Khan + + +Signed-off-by: +diff --git a/lib/cpufreq.c b/lib/cpufreq.c index 2f55d4d23446..6e04304560ca 100644 --- a/lib/cpufreq.c +++ b/lib/cpufreq.c @@ -129,7 +142,7 @@ index 2f55d4d23446..6e04304560ca 100644 static struct cpufreq_affected_cpus *sysfs_get_cpu_list(unsigned int cpu, const char *file) { -diff --git a/tools/power/cpupower/lib/cpufreq.h b/tools/power/cpupower/lib/cpufreq.h +diff --git a/lib/cpufreq.h b/lib/cpufreq.h index a55f0d19215b..95f4fd9e2656 100644 --- a/lib/cpufreq.h +++ b/lib/cpufreq.h @@ -169,7 +182,7 @@ index a55f0d19215b..95f4fd9e2656 100644 /* determine affected CPUs -diff --git a/tools/power/cpupower/utils/cpufreq-info.c b/tools/power/cpupower/utils/cpufreq-info.c +diff --git a/utils/cpufreq-info.c b/utils/cpufreq-info.c index e63cf55f81cf..6efc0f6b1b11 100644 --- a/utils/cpufreq-info.c +++ b/utils/cpufreq-info.c diff --git a/cpupower.changes b/cpupower.changes index 320428f..15a836c 100644 --- a/cpupower.changes +++ b/cpupower.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Jan 30 13:25:05 UTC 2020 - trenn@suse.de + +- Add mainline patch with proper patch header and filename: +D libcpupower_fix_api_cpufreq_get_frequencies_breakage.patch +A cpupower-Revert-library-ABI-changes-from-commit-ae2917093fb60bdc1ed3e.patch +- Fix manpage (bsc#1162142) +A Correction-to-manpage-of-cpupower.patch + ------------------------------------------------------------------- Thu Nov 28 13:56:32 UTC 2019 - trenn@suse.de diff --git a/cpupower.spec b/cpupower.spec index b7bca93..1d16305 100644 --- a/cpupower.spec +++ b/cpupower.spec @@ -1,7 +1,7 @@ # # spec file for package cpupower # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # Author: Thomas Renninger # # All modifications and additions to the file contributed by third parties @@ -42,7 +42,8 @@ Source5: Makefile.intel-speed-select Patch1: cpupower_rapl.patch Patch2: rapl_monitor.patch Patch3: cpupower_exclude_kernel_Makefile.patch -Patch4: libcpupower_fix_api_cpufreq_get_frequencies_breakage.patch +Patch4: cpupower-Revert-library-ABI-changes-from-commit-ae2917093fb60bdc1ed3e.patch +Patch5: Correction-to-manpage-of-cpupower.patch #turbostat patches Patch22: turbostat_makefile_fix_asm_header.patch @@ -96,6 +97,7 @@ powersave module. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 cd ../turbostat-%{tsversion} %patch22 -p1