]>
Commit | Line | Data |
---|---|---|
f50b0cbf AF |
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 |