projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6148a47
)
tools: turbostat: fix bitwise and operand
author
Thomas Renninger
<trenn@suse.de>
Fri, 21 Jan 2011 14:11:19 +0000
(15:11 +0100)
committer
Len Brown
<len.brown@intel.com>
Fri, 11 Feb 2011 04:58:11 +0000
(23:58 -0500)
bug could cause false positive on indicating
presence of invarient TSC or APERF support.
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c
patch
|
blob
|
blame
|
history
diff --git
a/tools/power/x86/turbostat/turbostat.c
b/tools/power/x86/turbostat/turbostat.c
index 4c6983de6fd94dfef7d44ff4a932d69f4219b456..a96248f1926437c83898ea2f59c8077934bd4107 100644
(file)
--- a/
tools/power/x86/turbostat/turbostat.c
+++ b/
tools/power/x86/turbostat/turbostat.c
@@
-892,7
+892,7
@@
void check_cpuid()
* this check is valid for both Intel and AMD
*/
asm("cpuid" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (0x80000007));
- has_invariant_tsc = edx &
&
(1 << 8);
+ has_invariant_tsc = edx & (1 << 8);
if (!has_invariant_tsc) {
fprintf(stderr, "No invariant TSC\n");
@@
-905,7
+905,7
@@
void check_cpuid()
*/
asm("cpuid" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (0x6));
- has_aperf = ecx &
&
(1 << 0);
+ has_aperf = ecx & (1 << 0);
if (!has_aperf) {
fprintf(stderr, "No APERF MSR\n");
exit(1);