aboutsummaryrefslogtreecommitdiffstats
path: root/main/cpufrequtils/0001-Only-x86-has-cpuid-instruction.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-12-02 09:52:11 +0000
committerTimo Teräs <timo.teras@iki.fi>2014-12-02 09:53:48 +0000
commit862c741a3ccc0936ce80840bad3937dec6a52c4d (patch)
tree17c50031bdf772cd550ec3600fb4c2ba439a73f7 /main/cpufrequtils/0001-Only-x86-has-cpuid-instruction.patch
parentfc0e71c84b2f87957a39905d17240097e8cb475f (diff)
downloadaports-862c741a3ccc0936ce80840bad3937dec6a52c4d.tar.bz2
aports-862c741a3ccc0936ce80840bad3937dec6a52c4d.tar.xz
main/cpufrequtils: apply upstream commits to fix arm build
and also the other issues we were already patching for.
Diffstat (limited to 'main/cpufrequtils/0001-Only-x86-has-cpuid-instruction.patch')
-rw-r--r--main/cpufrequtils/0001-Only-x86-has-cpuid-instruction.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/main/cpufrequtils/0001-Only-x86-has-cpuid-instruction.patch b/main/cpufrequtils/0001-Only-x86-has-cpuid-instruction.patch
new file mode 100644
index 0000000000..d3bc14d51b
--- /dev/null
+++ b/main/cpufrequtils/0001-Only-x86-has-cpuid-instruction.patch
@@ -0,0 +1,34 @@
+From f1b6bccf08f53295b2f7f448f28bbd37533c14a2 Mon Sep 17 00:00:00 2001
+From: Zhang Le <r0bertz@gentoo.org>
+Date: Sun, 18 Jul 2010 02:05:28 +0800
+Subject: [PATCH 1/8] Only x86 has cpuid instruction
+
+Signed-off-by: Zhang Le <r0bertz@gentoo.org>
+Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
+---
+ utils/aperf.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/utils/aperf.c b/utils/aperf.c
+index 627fb17..1c64501 100644
+--- a/utils/aperf.c
++++ b/utils/aperf.c
+@@ -68,11 +68,15 @@ struct avg_perf_cpu_info
+
+ static int cpu_has_effective_freq()
+ {
++#if defined(__i386__) || defined(__x86_64__)
+ /* largest base level */
+ if (cpuid_eax(0) < 6)
+ return 0;
+
+ return cpuid_ecx(6) & 0x1;
++#else
++ return 0;
++#endif
+ }
+
+ /*
+--
+1.7.10
+