]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/cpufrequtils/0001-Only-x86-has-cpuid-instruction.patch
openssh: Update to version 9.4p1
[people/pmueller/ipfire-2.x.git] / src / patches / cpufrequtils / 0001-Only-x86-has-cpuid-instruction.patch
CommitLineData
f50b0cbf
AF
1From f1b6bccf08f53295b2f7f448f28bbd37533c14a2 Mon Sep 17 00:00:00 2001
2From: Zhang Le <r0bertz@gentoo.org>
3Date: Sun, 18 Jul 2010 02:05:28 +0800
4Subject: [PATCH 1/8] Only x86 has cpuid instruction
5
6Signed-off-by: Zhang Le <r0bertz@gentoo.org>
7Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
8---
9 utils/aperf.c | 4 ++++
10 1 file changed, 4 insertions(+)
11
12diff --git a/utils/aperf.c b/utils/aperf.c
13index 627fb17..1c64501 100644
14--- a/utils/aperf.c
15+++ b/utils/aperf.c
16@@ -68,11 +68,15 @@ struct avg_perf_cpu_info
17
18 static int cpu_has_effective_freq()
19 {
20+#if defined(__i386__) || defined(__x86_64__)
21 /* largest base level */
22 if (cpuid_eax(0) < 6)
23 return 0;
24
25 return cpuid_ecx(6) & 0x1;
26+#else
27+ return 0;
28+#endif
29 }
30
31 /*
32--
331.7.10
34