From 88eeebbf145ee46652e87a39d63355b0871466a9d8eba45b1ec0c54a1c3761fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20M=C3=B6llers?= Date: Thu, 5 Oct 2017 14:08:00 +0000 Subject: [PATCH] Accepting request 531730 from home:jmoellers:branches:hardware OBS-URL: https://build.opensuse.org/request/show/531730 OBS-URL: https://build.opensuse.org/package/show/hardware/cpupower?expand=0&rev=67 --- cpupower.changes | 7 +++++++ cpupower.spec | 3 +++ ...decode_MSR_IA32_MISC_ENABLE_only_on_Intel.patch | 14 ++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 turbostat_decode_MSR_IA32_MISC_ENABLE_only_on_Intel.patch diff --git a/cpupower.changes b/cpupower.changes index b06abf1..4fbbc79 100644 --- a/cpupower.changes +++ b/cpupower.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Oct 5 12:02:46 UTC 2017 - josef.moellers@suse.com + +- Enter decode_misc_enable_msr() only if genuine_intel. + [bsc#1048546, + turbostat_decode_MSR_IA32_MISC_ENABLE_only_on_Intel.patch] + ------------------------------------------------------------------- Wed May 3 11:13:53 UTC 2017 - trenn@suse.de diff --git a/cpupower.spec b/cpupower.spec index dd848ca..d8bb18b 100644 --- a/cpupower.spec +++ b/cpupower.spec @@ -33,6 +33,8 @@ Source2: cpupower_export_tarball_from_git.sh Patch20: turbostat_fix_man_perm.patch Patch22: turbostat_makefile_fix_asm_header.patch +# Fixes bsc#1048546: +Patch23: turbostat_decode_MSR_IA32_MISC_ENABLE_only_on_Intel.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: gettext-tools BuildRequires: pciutils @@ -80,6 +82,7 @@ powersave module. cd ../turbostat-%{tsversion} %patch20 -p1 %patch22 -p1 +%patch23 -p1 %build # This package failed when testing with -Wl,-as-needed being default. diff --git a/turbostat_decode_MSR_IA32_MISC_ENABLE_only_on_Intel.patch b/turbostat_decode_MSR_IA32_MISC_ENABLE_only_on_Intel.patch new file mode 100644 index 0000000..317f9b2 --- /dev/null +++ b/turbostat_decode_MSR_IA32_MISC_ENABLE_only_on_Intel.patch @@ -0,0 +1,14 @@ +Index: turbostat-17.04.12/turbostat.c +=================================================================== +--- turbostat-17.04.12.orig/turbostat.c ++++ turbostat-17.04.12/turbostat.c +@@ -3895,6 +3895,9 @@ void decode_misc_enable_msr(void) + { + unsigned long long msr; + ++ if (!genuine_intel) ++ return; ++ + if (!get_msr(base_cpu, MSR_IA32_MISC_ENABLE, &msr)) + fprintf(outf, "cpu%d: MSR_IA32_MISC_ENABLE: 0x%08llx (%sTCC %sEIST %sMWAIT %sPREFETCH %sTURBO)\n", + base_cpu, msr,