"Fossies" - the Fresh Open Source Software Archive 
Member "ipfire-2.x-2.27-core174/src/patches/cpufrequtils/0001-Only-x86-has-cpuid-instruction.patch" (7 Apr 2023, 759 Bytes) of package /linux/misc/ipfire-2.x-2.27-core174.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Diff source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 From f1b6bccf08f53295b2f7f448f28bbd37533c14a2 Mon Sep 17 00:00:00 2001
2 From: Zhang Le <r0bertz@gentoo.org>
3 Date: Sun, 18 Jul 2010 02:05:28 +0800
4 Subject: [PATCH 1/8] Only x86 has cpuid instruction
5
6 Signed-off-by: Zhang Le <r0bertz@gentoo.org>
7 Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
8 ---
9 utils/aperf.c | 4 ++++
10 1 file changed, 4 insertions(+)
11
12 diff --git a/utils/aperf.c b/utils/aperf.c
13 index 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 --
33 1.7.10
34